diff --git a/.github/workflows/macaron-check-github-actions.yml b/.github/workflows/macaron-check-github-actions.yml index 13364e45b2..f86ed08229 100644 --- a/.github/workflows/macaron-check-github-actions.yml +++ b/.github/workflows/macaron-check-github-actions.yml @@ -34,4 +34,4 @@ jobs: repo_path: ./ policy_file: check-github-actions policy_purl: pkg:github.com/oracle/oci-java-sdk@.* - reports_retention_days: 90 + reports_retention_days: 90 \ No newline at end of file diff --git a/.github/workflows/releasepublished.yml b/.github/workflows/releasepublished.yml index 56ec9489bf..833b168c78 100644 --- a/.github/workflows/releasepublished.yml +++ b/.github/workflows/releasepublished.yml @@ -212,4 +212,4 @@ jobs: echo "Dropping OSSRH staging repo: $repository_namespace" curl -sS -X 'DELETE' -H "Authorization: Bearer ${{ secrets.PORTAL_ACCESS_TOKEN }}" https://ossrh-staging-api.central.sonatype.com/manual/drop/repository/$repository_namespace curl -sS -X 'POST' -H 'Accept:application/json' -H "Authorization: Bearer ${{ secrets.PORTAL_ACCESS_TOKEN }}" "https://central.sonatype.com/api/v1/publisher/status?id=$portal_id" | jq -e 'if .deploymentState == "FAILED" then error(.errors | tostring) else .deploymentState end' - echo "Portal Staging repository: https://central.sonatype.com/api/v1/publisher/deployment/$portal_id/download/" + echo "Portal Staging repository: https://central.sonatype.com/api/v1/publisher/deployment/$portal_id/download/" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2325c8ae0d..5eb5a27659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,51 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). -## Unreleased -### Breaking Changes -- Apache connector configuration now propagates `SSLInitializationException` when TLS initialization fails instead of silently registering a plaintext socket factory for `https`. Applications that require the former behavior must explicitly provide a plaintext connection manager; see [PlainConnectionSocketFactoryExample.java](bmc-examples/src/main/java/PlainConnectionSocketFactoryExample.java). + +## 2.97.0 - 2026-08-11 +## Added +- Support for the OCI Device Data FHIR (Fast Healthcare Interoperability Resources) Service +- Support for the Globally Distributed Database service +- Support for cloning autonomous container databases from backups by timestamp and retrieving backup details in the Database service +- Support for managing automatic failover for existing data guard configurations with multiple standby databases in the Database service +- Support for creating and managing private-offer quotes and quote attachments in the Marketplace Private Offer service +- Support for usage-based SaaS listings, subscription usage reporting, and subscription cancellation in the Service Enablement Lifecycle Framework service +- Support for network security group IDs on private endpoints during open search cluster updates in the OpenSearch service +- Support for database tools MCP server, DB API gateway configuration, and IAM authentication APIs in the Database Tools service +- Support for availability domain selection during and after provisioning of autonomous databases in the Database service +- Support for system tags in virtual cloud networks and subnets in the Networking service +- Support for local time zones in the Resource Scheduler service +- Support for IPv6 dual-stack endpoints in the Object Storage service +- Support for B300 unit shapes in the Generative AI service +- Support for retrieving work request log entries and their content in the Resource Manager service +- Support for quick-recycle settings in compute host groups in the Compute service + +### Breaking Changes +- The return type of method `public com.oracle.bmc.self.model.PricingPlan$BillingFrequency getBillingFrequency()` has been changed to `com.oracle.bmc.self.model.BillingFrequency` in the model `com.oracle.bmc.self.model.PricingPlan` in the Service Enablement Lifecycle Framework service +- The return type of method `public com.oracle.bmc.self.model.BillingDetails getBillingDetails()` has been changed to `java.util.List` in the model `com.oracle.bmc.self.model.SubscriptionDetails` in the Service Enablement Lifecycle Framework service +- Class `com.oracle.bmc.self.model.PricingPlan$BillingFrequency` has been removed from the Service Enablement Lifecycle Framework service +- Enum value `SelfTokenId` has been removed from the enum class `SortBy` in request classes `com.oracle.bmc.self.requests.ListSubscriptionsRequest` and `com.oracle.bmc.self.requests.ListingSubscriptionsRequest` in the Service Enablement Lifecycle Framework service + +### Fixed +- Fixed token refresh recovery after session-key or certificate-refresh failures so concurrent callers are not left attached to an incomplete refresh + +## 2.96.0 - 2026-08-04 +### Added +- Support for cloning autonomous container databases from backups by timestamp and retrieving backup details in the Database service +- Support for managing automatic failover for existing data guard configurations with multiple standby databases in the Database service +- Support for creating and managing private-offer quotes and quote attachments in the Marketplace Private Offer service +- Support for usage-based SaaS listings, subscription usage reporting, and subscription cancellation in the Service Enablement Lifecycle Framework service +- Support for network security group IDs on private endpoints during open search cluster updates in the OpenSearch service +- Support for database tools MCP server, DB API gateway configuration, and IAM authentication APIs in the Database Tools service    + +### Breaking Changes +- The return type of method `public com.oracle.bmc.self.model.PricingPlan$BillingFrequency getBillingFrequency()` has been changed to `com.oracle.bmc.self.model.BillingFrequency` in the model `com.oracle.bmc.self.model.PricingPlan` in the Service Enablement Lifecycle Framework service +- The return type of method `public com.oracle.bmc.self.model.BillingDetails getBillingDetails()` has been changed to `java.util.List` in the model `com.oracle.bmc.self.model.SubscriptionDetails` in the Service Enablement Lifecycle Framework service +- Class `com.oracle.bmc.self.model.PricingPlan$BillingFrequency` has been removed from the Service Enablement Lifecycle Framework service +- Enum value `SelfTokenId` has been removed from the enum class `SortBy` in request classes `com.oracle.bmc.self.requests.ListSubscriptionsRequest` and `com.oracle.bmc.self.requests.ListingSubscriptionsRequest` in the Service Enablement Lifecycle Framework service + +### Fixed +- Fixed token refresh recovery after session-key or certificate-refresh failures so concurrent callers are not left attached to an incomplete refresh ## 2.95.0 - 2026-07-28 ### Added @@ -103,6 +145,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). - The return type of method `public com.oracle.bmc.generativeai.model.HostedApplication$LifecycleState getLifecycleState()` has been changed to `com.oracle.bmc.generativeai.model.HostedApplicationBase$LifecycleState` in the request class `com.oracle.bmc.generativeai.requests.ListHostedApplicationsRequest` in the Generative AI service - The field `compartmentId` has been made required in the requests `ListApiMetadataByEntityTypesRequest`, `ListApiMetadataRequest`, `ListPrivilegedApiControlsRequest`, `ListPrivilegedApiRequestsRequest`, and `ListWorkRequestsRequest` in the Oracle API Access Control service - The field `compartmentId` has been made required in the model `CreatePrivilegedApiRequestDetails` in the Oracle API Access Control service +- Apache connector configuration now propagates `SSLInitializationException` when TLS initialization fails instead of silently registering a plaintext socket factory for `https`. Applications that require the former behavior must explicitly provide a plaintext connection manager; see [PlainConnectionSocketFactoryExample.java](bmc-examples/src/main/java/PlainConnectionSocketFactoryExample.java) ## 2.94.0 - 2026-07-14 ### Added diff --git a/bmc-accessgovernancecp/pom.xml b/bmc-accessgovernancecp/pom.xml index a37fffe4ad..b90b93dc7e 100644 --- a/bmc-accessgovernancecp/pom.xml +++ b/bmc-accessgovernancecp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-accessgovernancecp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 31126f07e0..02b2805820 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 2.95.0 + 2.97.0 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-addons/bmc-graalvm-addon/pom.xml b/bmc-addons/bmc-graalvm-addon/pom.xml index 7537ff8bc2..cb1c0d26a2 100644 --- a/bmc-addons/bmc-graalvm-addon/pom.xml +++ b/bmc-addons/bmc-graalvm-addon/pom.xml @@ -4,7 +4,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-addons-graalvm @@ -127,24 +127,24 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.95.0 + 2.97.0 test com.oracle.oci.sdk oci-java-sdk-identity - 2.95.0 + 2.97.0 test com.oracle.oci.sdk oci-java-sdk-core - 2.95.0 + 2.97.0 test diff --git a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java b/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java index 1c1ce96aca..cf5f25ab85 100644 --- a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java +++ b/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java @@ -60,6 +60,7 @@ "com.oracle.bmc.datascience.SdkClientsMetadata", "com.oracle.bmc.dblm.SdkClientsMetadata", "com.oracle.bmc.dbmulticloud.SdkClientsMetadata", + "com.oracle.bmc.ddfs.SdkClientsMetadata", "com.oracle.bmc.delegateaccesscontrol.SdkClientsMetadata", "com.oracle.bmc.demandsignal.SdkClientsMetadata", "com.oracle.bmc.desktops.SdkClientsMetadata", @@ -67,6 +68,7 @@ "com.oracle.bmc.dif.SdkClientsMetadata", "com.oracle.bmc.disasterrecovery.SdkClientsMetadata", "com.oracle.bmc.distributeddatabase.SdkClientsMetadata", + "com.oracle.bmc.distributeddatabasev26.SdkClientsMetadata", "com.oracle.bmc.dns.SdkClientsMetadata", "com.oracle.bmc.email.SdkClientsMetadata", "com.oracle.bmc.emaildataplane.SdkClientsMetadata", diff --git a/bmc-addons/bmc-oke-workload-identity/pom.xml b/bmc-addons/bmc-oke-workload-identity/pom.xml index 13b07ff9c3..d1d0c5b4f4 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 - 2.95.0 + 2.97.0 4.0.0 @@ -38,7 +38,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.fasterxml.jackson.core diff --git a/bmc-addons/bmc-resteasy-client-configurator/pom.xml b/bmc-addons/bmc-resteasy-client-configurator/pom.xml index c69abd0fa8..ceb0dac2e6 100644 --- a/bmc-addons/bmc-resteasy-client-configurator/pom.xml +++ b/bmc-addons/bmc-resteasy-client-configurator/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 2.95.0 + 2.97.0 ../pom.xml @@ -25,7 +25,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-addons/bmc-sasl/pom.xml b/bmc-addons/bmc-sasl/pom.xml index cbf0ec94ff..998b93f079 100644 --- a/bmc-addons/bmc-sasl/pom.xml +++ b/bmc-addons/bmc-sasl/pom.xml @@ -7,7 +7,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -62,7 +62,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 2e4dc7d5ad..85c705b032 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml diff --git a/bmc-adm/pom.xml b/bmc-adm/pom.xml index ec8d5c3f92..ef6de865d3 100644 --- a/bmc-adm/pom.xml +++ b/bmc-adm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-adm @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-aidataplatform/pom.xml b/bmc-aidataplatform/pom.xml index 7ebdd7792c..9970e53305 100644 --- a/bmc-aidataplatform/pom.xml +++ b/bmc-aidataplatform/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-aidataplatform @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-aidocument/pom.xml b/bmc-aidocument/pom.xml index 6a8d69a9de..4fd557a6c7 100644 --- a/bmc-aidocument/pom.xml +++ b/bmc-aidocument/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-aidocument @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-ailanguage/pom.xml b/bmc-ailanguage/pom.xml index beb28466a7..6133fccbc9 100644 --- a/bmc-ailanguage/pom.xml +++ b/bmc-ailanguage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-ailanguage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-aispeech/pom.xml b/bmc-aispeech/pom.xml index 31058b6bbb..b15ac411fc 100644 --- a/bmc-aispeech/pom.xml +++ b/bmc-aispeech/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-aispeech @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-aivision/pom.xml b/bmc-aivision/pom.xml index f6d4cce147..cd1de43ca2 100644 --- a/bmc-aivision/pom.xml +++ b/bmc-aivision/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-aivision @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-analytics/pom.xml b/bmc-analytics/pom.xml index f1f6c62d17..36425b4653 100644 --- a/bmc-analytics/pom.xml +++ b/bmc-analytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-analytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-announcementsservice/pom.xml b/bmc-announcementsservice/pom.xml index 6bd0f56f3c..4cca8b0f08 100644 --- a/bmc-announcementsservice/pom.xml +++ b/bmc-announcementsservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-announcementsservice @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-apiaccesscontrol/pom.xml b/bmc-apiaccesscontrol/pom.xml index e8bd200cab..ca5855530c 100644 --- a/bmc-apiaccesscontrol/pom.xml +++ b/bmc-apiaccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apiaccesscontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-apigateway/pom.xml b/bmc-apigateway/pom.xml index 6c03fcb4c1..017308b239 100644 --- a/bmc-apigateway/pom.xml +++ b/bmc-apigateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apigateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-apiplatform/pom.xml b/bmc-apiplatform/pom.xml index 7abbd27946..8bf15cb1d5 100644 --- a/bmc-apiplatform/pom.xml +++ b/bmc-apiplatform/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apiplatform @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-apmconfig/pom.xml b/bmc-apmconfig/pom.xml index 797d67bd88..6fe900d655 100644 --- a/bmc-apmconfig/pom.xml +++ b/bmc-apmconfig/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apmconfig @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-apmcontrolplane/pom.xml b/bmc-apmcontrolplane/pom.xml index 9f2be02fed..584943d73d 100644 --- a/bmc-apmcontrolplane/pom.xml +++ b/bmc-apmcontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apmcontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-apmsynthetics/pom.xml b/bmc-apmsynthetics/pom.xml index cd1db7a3c5..5621efc147 100644 --- a/bmc-apmsynthetics/pom.xml +++ b/bmc-apmsynthetics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apmsynthetics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-apmtraces/pom.xml b/bmc-apmtraces/pom.xml index e1b9ec9bd5..7bdc0781e7 100644 --- a/bmc-apmtraces/pom.xml +++ b/bmc-apmtraces/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-apmtraces @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-appmgmtcontrol/pom.xml b/bmc-appmgmtcontrol/pom.xml index 4e0a06f110..0ef3c436bb 100644 --- a/bmc-appmgmtcontrol/pom.xml +++ b/bmc-appmgmtcontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-appmgmtcontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-artifacts/pom.xml b/bmc-artifacts/pom.xml index 71b99a2986..6b535056cb 100644 --- a/bmc-artifacts/pom.xml +++ b/bmc-artifacts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-artifacts @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index ffd4b36c7f..96cc3eed6a 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-autoscaling/pom.xml b/bmc-autoscaling/pom.xml index c37df02d5a..d98cc9fde8 100644 --- a/bmc-autoscaling/pom.xml +++ b/bmc-autoscaling/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-autoscaling @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-bastion/pom.xml b/bmc-bastion/pom.xml index d64713217b..c51def22d3 100644 --- a/bmc-bastion/pom.xml +++ b/bmc-bastion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-bastion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-batch/pom.xml b/bmc-batch/pom.xml index 7b96b107cb..c79b526a8d 100644 --- a/bmc-batch/pom.xml +++ b/bmc-batch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-batch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-bds/pom.xml b/bmc-bds/pom.xml index ccfc829984..4c76caa696 100644 --- a/bmc-bds/pom.xml +++ b/bmc-bds/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-bds @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-blockchain/pom.xml b/bmc-blockchain/pom.xml index 4870b2199e..99df0f0613 100644 --- a/bmc-blockchain/pom.xml +++ b/bmc-blockchain/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-blockchain @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index f4dc1424e0..cc15726553 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-bom @@ -19,1079 +19,1091 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-shaded-full - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-audit - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-containerengine - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-core - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-database - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dns - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-email - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-filestorage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-identity - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-addons-sasl - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-addons-oke-workload-identity - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-addons-graalvm - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-resourcesearch - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-addons-apache - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-waas - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-streaming - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-monitoring - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-ons - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-budget - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-workrequests - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-limits - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-functions - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-events - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-oce - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-oda - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-analytics - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-integration - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-marketplace - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apigateway - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datacatalog - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dataflow - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datascience - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-nosql - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-secrets - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-vault - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-bds - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-encryption - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-cims - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datasafe - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-mysql - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dataintegration - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-ocvp - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-usageapi - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-blockchain - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-loggingingestion - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-logging - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-loganalytics - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-managementdashboard - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-sch - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-loggingsearch - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-managementagent - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-cloudguard - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-opsi - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-computeinstanceagent - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-optimizer - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-tenantmanagercontrolplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-rover - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-databasemanagement - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-artifacts - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apmsynthetics - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-goldengate - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apmcontrolplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apmtraces - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-networkloadbalancer - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-vulnerabilityscanning - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-databasemigration - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-servicecatalog - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-ailanguage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-operatoraccesscontrol - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-bastion - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-genericartifactscontent - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-jms - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-devops - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservice - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservicedataplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apmconfig - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-waf - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-certificates - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-certificatesmanagement - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-usage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-databasetools - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-servicemanagerproxy - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-appmgmtcontrol - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-ospgateway - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-identitydataplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-visualbuilder - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-osubusage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-osubsubscription - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-osuborganizationsubscription - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-osubbillingschedule - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dashboardservice - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-threatintelligence - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-aivision - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-aispeech - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-stackmonitoring - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-adm - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-licensemanager - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-onesubscription - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-governancerulescontrolplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-waa - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-networkfirewall - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-vnmonitoring - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-emwarehouse - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-lockbox - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-fusionapps - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-mediaservices - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-opa - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-opensearch - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-cloudmigrations - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-cloudbridge - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-disasterrecovery - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-containerinstances - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-aidocument - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-queue - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-recovery - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-vbsinst - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-identitydomains - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-accessgovernancecp - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-ocicontrolcenter - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-osmanagementhub - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-fleetsoftwareupdate - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-computecloudatcustomer - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-marketplacepublisher - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-redis - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-jmsjavadownloads - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-psql - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-generativeai - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-capacitymanagement - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-desktops - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-emaildataplane - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-clusterplacementgroups - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-resourcescheduler - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-demandsignal - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-fleetappsmanagement - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-delegateaccesscontrol - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiagent - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiagentruntime - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-securityattribute - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-zpr - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dblm - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-mngdmac - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-lustrefilestorage - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-modeldeployment - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-distributeddatabase - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apiaccesscontrol - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-wlms - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dbmulticloud - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-apiplatform - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-managedkafka - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-aidataplatform - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-multicloud - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-resourceanalytics - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-jmsutils - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-iot - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-psa - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-dif - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-batch - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-marketplaceprivateoffer - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-gdp - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-limitsincrease - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-generativeaidata - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-self - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-containerregistry - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-databasetoolsruntime - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-costad - 2.95.0 + 2.97.0 false com.oracle.oci.sdk oci-java-sdk-datacc - 2.95.0 + 2.97.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-ddfs + 2.97.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-distributeddatabasev26 + 2.97.0 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index 98af83a068..361a061be5 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-budget @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-capacitymanagement/pom.xml b/bmc-capacitymanagement/pom.xml index cb0773b345..b011eccdda 100644 --- a/bmc-capacitymanagement/pom.xml +++ b/bmc-capacitymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-capacitymanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-certificates/pom.xml b/bmc-certificates/pom.xml index af7fd7ded4..fb09cad403 100644 --- a/bmc-certificates/pom.xml +++ b/bmc-certificates/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-certificates @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-certificatesmanagement/pom.xml b/bmc-certificatesmanagement/pom.xml index c8403a8ab1..c412436651 100644 --- a/bmc-certificatesmanagement/pom.xml +++ b/bmc-certificatesmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-certificatesmanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-cims/pom.xml b/bmc-cims/pom.xml index 3c1d6d0df3..737ae1bb78 100644 --- a/bmc-cims/pom.xml +++ b/bmc-cims/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-cims @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-circuitbreaker/pom.xml b/bmc-circuitbreaker/pom.xml index e853d89ad7..89520d09a3 100644 --- a/bmc-circuitbreaker/pom.xml +++ b/bmc-circuitbreaker/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-circuitbreaker diff --git a/bmc-cloudbridge/pom.xml b/bmc-cloudbridge/pom.xml index c4137838ae..d82617c672 100644 --- a/bmc-cloudbridge/pom.xml +++ b/bmc-cloudbridge/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-cloudbridge @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-cloudguard/pom.xml b/bmc-cloudguard/pom.xml index cf376f0def..7c43208739 100644 --- a/bmc-cloudguard/pom.xml +++ b/bmc-cloudguard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-cloudguard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-cloudmigrations/pom.xml b/bmc-cloudmigrations/pom.xml index 0aa608f2c3..bd869f40db 100644 --- a/bmc-cloudmigrations/pom.xml +++ b/bmc-cloudmigrations/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-cloudmigrations @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-clusterplacementgroups/pom.xml b/bmc-clusterplacementgroups/pom.xml index 10517e2ad4..b74f6714a3 100644 --- a/bmc-clusterplacementgroups/pom.xml +++ b/bmc-clusterplacementgroups/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-clusterplacementgroups @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index 48300af904..5d893003b5 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -92,7 +92,7 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.95.0 + 2.97.0 diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java index f39d8b0ff2..9d3e925d91 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java @@ -237,55 +237,63 @@ private String refreshAndGetSecurityTokenInner( } if (iAmTheLeader) { - LOG.info("[Leader] About to refresh security token."); + try { + LOG.info("[Leader] About to refresh security token."); - if (refreshKeys) { - LOG.info("Refreshing session keys."); - sessionKeySupplier.refreshKeys(); - } - if (leafCertificateSupplier instanceof Refreshable) { - try { - ((Refreshable) leafCertificateSupplier).refresh(); - } catch (RefreshFailedException ex) { - throw new BmcException( - false, "Can't refresh the leaf certification!", ex, null); - } - // When using default purpose (ex, instance principals), the token request should always be signed with the same tenant id as the certificate. - // For other purposes, the tenant id can be different. - if (this.purpose.equals(DEFAULT_PURPOSE)) { - String newTenancyId = - AuthUtils.getTenantIdFromCertificate( - leafCertificateSupplier - .getCertificateAndKeyPair() - .getCertificate()); - - if (!this.tenancyId.equals(newTenancyId)) { - throw new IllegalArgumentException( - "The tenancy id should never be changed in cert file!"); - } + if (refreshKeys) { + LOG.info("Refreshing session keys."); + sessionKeySupplier.refreshKeys(); } - } - - for (X509CertificateSupplier supplier : intermediateCertificateSuppliers) { - if (supplier instanceof Refreshable) { + if (leafCertificateSupplier instanceof Refreshable) { try { - ((Refreshable) supplier).refresh(); + ((Refreshable) leafCertificateSupplier).refresh(); } catch (RefreshFailedException ex) { throw new BmcException( - false, "Can't refresh the intermediate certification!", ex, null); + false, "Can't refresh the leaf certification!", ex, null); + } + // When using default purpose (ex, instance principals), the token request should always be signed with the same tenant id as the certificate. + // For other purposes, the tenant id can be different. + if (this.purpose.equals(DEFAULT_PURPOSE)) { + String newTenancyId = + AuthUtils.getTenantIdFromCertificate( + leafCertificateSupplier + .getCertificateAndKeyPair() + .getCertificate()); + + if (!this.tenancyId.equals(newTenancyId)) { + throw new IllegalArgumentException( + "The tenancy id should never be changed in cert file!"); + } } } - } - try { - securityTokenAdapter = getSecurityTokenFromServer(); - String token = securityTokenAdapter.getSecurityToken(); - future.complete(token); - return token; - } catch (Exception e) { - LOG.error("Error refreshing security token", e); - future.completeExceptionally(e); - throw new BmcException(false, "Error refreshing security token.", e, null); + for (X509CertificateSupplier supplier : intermediateCertificateSuppliers) { + if (supplier instanceof Refreshable) { + try { + ((Refreshable) supplier).refresh(); + } catch (RefreshFailedException ex) { + throw new BmcException( + false, + "Can't refresh the intermediate certification!", + ex, + null); + } + } + } + + try { + securityTokenAdapter = getSecurityTokenFromServer(); + String token = securityTokenAdapter.getSecurityToken(); + future.complete(token); + return token; + } catch (Exception e) { + LOG.error("Error refreshing security token", e); + future.completeExceptionally(e); + throw new BmcException(false, "Error refreshing security token.", e, null); + } + } catch (RuntimeException | Error failure) { + future.completeExceptionally(failure); + throw failure; } finally { inFlightRefresh = null; } diff --git a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java index f47a004bfe..4c647558c6 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java @@ -13,10 +13,19 @@ import com.oracle.bmc.http.internal.WrappedInvocationBuilder; import com.oracle.bmc.model.BmcException; import com.oracle.bmc.requests.BmcRequest; +import java.lang.reflect.Field; import java.security.KeyPairGenerator; +import java.security.cert.X509Certificate; +import java.security.interfaces.RSAPrivateKey; import java.util.ArrayList; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import javax.security.auth.RefreshFailedException; +import javax.security.auth.Refreshable; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -39,6 +48,11 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; @@ -50,6 +64,7 @@ @RunWith(PowerMockRunner.class) @PrepareForTest({ + AuthUtils.class, RestClientUtils.class, Thread.class, X509FederationClient.class, @@ -312,4 +327,367 @@ public void jacksonCanRoundTripSecurityToken() throws IOException { 1, serverCallCount.get()); } + + @Test + public void leafCertificateRuntimeFailureReleasesWaitingCallersAndAllowsNextRefresh() + throws Exception { + assertFailureReleasesWaitingCallersAndAllowsNextRefresh( + new IllegalArgumentException("Simulated IMDS certificate failure")); + } + + @Test + public void + leafCertificateRefreshFailureReturnsErrorToRefreshingAndWaitingCallersAndAllowsNextRefresh() + throws Exception { + RefreshFailedException failure = + new RefreshFailedException("IMDS GET cert.pem returned HTTP 404"); + CountDownLatch refreshEntered = new CountDownLatch(1); + CountDownLatch releaseFailure = new CountDownLatch(1); + AtomicInteger refreshAttempts = new AtomicInteger(); + TestRefreshableCertificateSupplier leafCertificateSupplier = + new TestRefreshableCertificateSupplier() { + @Override + public void refresh() throws RefreshFailedException { + if (refreshAttempts.getAndIncrement() != 0) { + return; + } + refreshEntered.countDown(); + try { + if (!releaseFailure.await(5, TimeUnit.SECONDS)) { + throw new RefreshFailedException( + "Timed out waiting to simulate cert.pem failure"); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new RefreshFailedException( + "Interrupted while simulating cert.pem failure"); + } + throw failure; + } + }; + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + X509FederationClient client = + createClient( + leafCertificateSupplier, + sessionKeySupplier, + Collections.emptySet(), + "TEST"); + stubSuccessfulTokenRequest(client, sessionKeySupplier); + + FutureTask leader = + new FutureTask<>(() -> captureGetSecurityTokenFailure(client)); + FutureTask follower = + new FutureTask<>(() -> captureGetSecurityTokenFailure(client)); + Thread leaderThread = new Thread(leader, "x509-refresh-leader"); + Thread followerThread = new Thread(follower, "x509-refresh-follower"); + try { + leaderThread.start(); + assertTrue( + "Leader did not enter certificate refresh", + refreshEntered.await(5, TimeUnit.SECONDS)); + + followerThread.start(); + final Object waitObject = new Object(); + long deadline = System.currentTimeMillis() + 5_000; + while (followerThread.getState() != Thread.State.TIMED_WAITING + && System.currentTimeMillis() < deadline) { + synchronized (waitObject) { + waitObject.wait(10); + } + } + assertEquals(Thread.State.TIMED_WAITING, followerThread.getState()); + + releaseFailure.countDown(); + Throwable leaderFailure = leader.get(5, TimeUnit.SECONDS); + Throwable followerFailure = follower.get(2, TimeUnit.SECONDS); + + assertTrue(leaderFailure instanceof BmcException); + assertSame(failure, leaderFailure.getCause()); + assertSame(leaderFailure, followerFailure); + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } finally { + releaseFailure.countDown(); + leaderThread.interrupt(); + followerThread.interrupt(); + leaderThread.join(5_000); + followerThread.join(5_000); + } + } + + @Test + public void seriousJavaErrorReleasesWaitingCallersAndAllowsNextRefresh() throws Exception { + assertFailureReleasesWaitingCallersAndAllowsNextRefresh( + new AssertionError("Simulated serious JVM failure")); + } + + @Test + public void sessionKeyFailureDoesNotBlockNextTokenRefresh() throws Exception { + IllegalStateException failure = new IllegalStateException("Session key refresh failed"); + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + AtomicInteger refreshAttempts = new AtomicInteger(); + Mockito.doAnswer( + invocation -> { + if (refreshAttempts.getAndIncrement() == 0) { + throw failure; + } + return null; + }) + .when(sessionKeySupplier) + .refreshKeys(); + + X509FederationClient client = + createClient( + mock(X509CertificateSupplier.class), + sessionKeySupplier, + Collections.emptySet(), + "TEST"); + stubSuccessfulTokenRequest(client, sessionKeySupplier); + + assertSame(failure, captureRefreshFailure(client)); + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } + + @Test + public void certificateTenancyValidationFailureDoesNotBlockNextTokenRefresh() throws Exception { + IllegalArgumentException failure = + new IllegalArgumentException("Certificate tenancy validation failed"); + X509Certificate certificate = mock(X509Certificate.class); + X509CertificateSupplier.CertificateAndPrivateKeyPair certificateAndPrivateKeyPair = + new X509CertificateSupplier.CertificateAndPrivateKeyPair(certificate, null); + TestRefreshableCertificateSupplier leafCertificateSupplier = + new TestRefreshableCertificateSupplier() { + @Override + public void refresh() {} + + @Override + public CertificateAndPrivateKeyPair getCertificateAndKeyPair() { + return certificateAndPrivateKeyPair; + } + }; + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + SecurityTokenAdapter successfulToken = + new SecurityTokenAdapter(VALID_TOKEN, sessionKeySupplier); + mockStatic(AuthUtils.class); + PowerMockito.when(AuthUtils.getTenantIdFromCertificate(certificate)) + .thenThrow(failure) + .thenReturn("tenantId"); + X509FederationClient client = + createClient( + leafCertificateSupplier, + sessionKeySupplier, + Collections.emptySet(), + "DEFAULT"); + PowerMockito.doReturn(successfulToken).when(client, "getSecurityTokenFromServer"); + + assertSame(failure, captureRefreshFailure(client)); + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } + + @Test + public void intermediateCertificateFailureDoesNotBlockNextTokenRefresh() throws Exception { + RefreshFailedException failure = + new RefreshFailedException("Intermediate certificate refresh failed"); + AtomicInteger refreshAttempts = new AtomicInteger(); + TestRefreshableCertificateSupplier intermediateCertificateSupplier = + new TestRefreshableCertificateSupplier() { + @Override + public void refresh() throws RefreshFailedException { + if (refreshAttempts.getAndIncrement() == 0) { + throw failure; + } + } + }; + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + X509FederationClient client = + createClient( + mock(X509CertificateSupplier.class), + sessionKeySupplier, + Collections.singleton(intermediateCertificateSupplier), + "TEST"); + stubSuccessfulTokenRequest(client, sessionKeySupplier); + + Throwable actualFailure = captureRefreshFailure(client); + assertTrue(actualFailure instanceof BmcException); + assertSame(failure, actualFailure.getCause()); + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } + + @Test + public void federationServerFailurePreservesErrorAndDoesNotBlockNextTokenRefresh() + throws Exception { + BmcException serverFailure = + new BmcException(500, "InternalError", "Federation server failed", "requestId"); + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + X509FederationClient client = + createClient( + mock(X509CertificateSupplier.class), + sessionKeySupplier, + Collections.emptySet(), + "TEST"); + AtomicInteger serverAttempts = new AtomicInteger(); + PowerMockito.doAnswer( + invocation -> { + if (serverAttempts.getAndIncrement() == 0) { + throw serverFailure; + } + return new SecurityTokenAdapter(VALID_TOKEN, sessionKeySupplier); + }) + .when(client, "getSecurityTokenFromServer"); + + Throwable actualFailure = captureRefreshFailure(client); + assertTrue(actualFailure instanceof BmcException); + assertTrue(actualFailure.getMessage().contains("Error refreshing security token.")); + assertSame(serverFailure, actualFailure.getCause()); + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } + + private void assertFailureReleasesWaitingCallersAndAllowsNextRefresh(Throwable failure) + throws Exception { + CountDownLatch refreshEntered = new CountDownLatch(1); + CountDownLatch releaseFailure = new CountDownLatch(1); + AtomicInteger refreshAttempts = new AtomicInteger(); + TestRefreshableCertificateSupplier leafCertificateSupplier = + new TestRefreshableCertificateSupplier() { + @Override + public void refresh() { + if (refreshAttempts.getAndIncrement() != 0) { + return; + } + refreshEntered.countDown(); + try { + if (!releaseFailure.await(5, TimeUnit.SECONDS)) { + throw new AssertionError( + "Timed out waiting to release refresh failure"); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new AssertionError( + "Interrupted while simulating refresh failure", e); + } + if (failure instanceof Error) { + throw (Error) failure; + } + throw (RuntimeException) failure; + } + }; + SessionKeySupplier sessionKeySupplier = mock(SessionKeySupplier.class); + X509FederationClient client = + createClient( + leafCertificateSupplier, + sessionKeySupplier, + Collections.emptySet(), + "TEST"); + stubSuccessfulTokenRequest(client, sessionKeySupplier); + + FutureTask leader = new FutureTask<>(client::refreshAndGetSecurityToken); + Thread leaderThread = new Thread(leader, "x509-refresh-leader"); + leaderThread.start(); + assertTrue( + "Leader did not enter certificate refresh", + refreshEntered.await(5, TimeUnit.SECONDS)); + CompletableFuture sharedFuture = getInFlightRefresh(client); + assertNotNull(sharedFuture); + + releaseFailure.countDown(); + try { + leader.get(5, TimeUnit.SECONDS); + fail("Leader should propagate the refresh failure"); + } catch (ExecutionException e) { + assertSame(failure, e.getCause()); + } finally { + releaseFailure.countDown(); + } + + assertTrue(sharedFuture.isCompletedExceptionally()); + try { + sharedFuture.get(1, TimeUnit.SECONDS); + fail("Follower should receive the leader failure"); + } catch (ExecutionException e) { + assertSame(failure, e.getCause()); + } + assertNull(getInFlightRefresh(client)); + assertEquals(VALID_TOKEN, client.refreshAndGetSecurityToken()); + } + + private X509FederationClient createClient( + X509CertificateSupplier leafCertificateSupplier, + SessionKeySupplier sessionKeySupplier, + Set intermediateCertificateSuppliers, + String purpose) { + return PowerMockito.spy( + new X509FederationClient( + "https://auth.example.com", + "tenantId", + leafCertificateSupplier, + sessionKeySupplier, + intermediateCertificateSuppliers, + mock(ClientConfigurator.class), + Collections.emptyList(), + mock(CircuitBreakerConfiguration.class), + purpose)); + } + + private void stubSuccessfulTokenRequest( + X509FederationClient client, SessionKeySupplier sessionKeySupplier) throws Exception { + PowerMockito.doReturn(new SecurityTokenAdapter(VALID_TOKEN, sessionKeySupplier)) + .when(client, "getSecurityTokenFromServer"); + } + + private Throwable captureRefreshFailure(X509FederationClient client) { + try { + client.refreshAndGetSecurityToken(); + } catch (RuntimeException failure) { + return failure; + } + fail("Token refresh should fail"); + return null; + } + + private Throwable captureGetSecurityTokenFailure(X509FederationClient client) { + try { + client.getSecurityToken(); + } catch (BmcException failure) { + return failure; + } + fail("Token refresh should fail"); + return null; + } + + @SuppressWarnings("unchecked") + private CompletableFuture getInFlightRefresh(X509FederationClient client) + throws Exception { + Field field = X509FederationClient.class.getDeclaredField("inFlightRefresh"); + field.setAccessible(true); + return (CompletableFuture) field.get(client); + } + + private abstract static class TestRefreshableCertificateSupplier + implements X509CertificateSupplier, Refreshable { + @Override + public boolean isCurrent() { + return false; + } + + @Override + @Deprecated + public X509Certificate getCertificate() { + return null; + } + + @Override + @Deprecated + public RSAPrivateKey getPrivateKey() { + return null; + } + + @Override + public CertificateAndPrivateKeyPair getCertificateAndKeyPair() { + return null; + } + } } diff --git a/bmc-computecloudatcustomer/pom.xml b/bmc-computecloudatcustomer/pom.xml index 5d41b87bac..db4f94bfbb 100644 --- a/bmc-computecloudatcustomer/pom.xml +++ b/bmc-computecloudatcustomer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-computecloudatcustomer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-computeinstanceagent/pom.xml b/bmc-computeinstanceagent/pom.xml index 4c04ec9754..9cfcfdd62c 100644 --- a/bmc-computeinstanceagent/pom.xml +++ b/bmc-computeinstanceagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-computeinstanceagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 3b458f9bda..8b160a0754 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-containerinstances/pom.xml b/bmc-containerinstances/pom.xml index 1b3b5cf77a..7cbe9d744e 100644 --- a/bmc-containerinstances/pom.xml +++ b/bmc-containerinstances/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-containerinstances @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-containerregistry/pom.xml b/bmc-containerregistry/pom.xml index 3ea9c7e152..0eab25a6a9 100644 --- a/bmc-containerregistry/pom.xml +++ b/bmc-containerregistry/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-containerregistry @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index f2a4994f55..2b47645dd4 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.95.0 + 2.97.0 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureFilter.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureFilter.java index 93914a908c..1c7eb26941 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureFilter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureFilter.java @@ -30,6 +30,7 @@ public final class CaptureFilter extends com.oracle.bmc.http.internal.Explicitly "id", "lifecycleState", "filterType", + "systemTags", "timeCreated", "vtapCaptureFilterRules", "flowLogCaptureFilterRules" @@ -42,6 +43,7 @@ public CaptureFilter( String id, LifecycleState lifecycleState, FilterType filterType, + java.util.Map> systemTags, java.util.Date timeCreated, java.util.List vtapCaptureFilterRules, java.util.List flowLogCaptureFilterRules) { @@ -53,6 +55,7 @@ public CaptureFilter( this.id = id; this.lifecycleState = lifecycleState; this.filterType = filterType; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vtapCaptureFilterRules = vtapCaptureFilterRules; this.flowLogCaptureFilterRules = flowLogCaptureFilterRules; @@ -197,6 +200,26 @@ public Builder filterType(FilterType filterType) { this.__explicitlySet__.add("filterType"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the capture filter was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -271,6 +294,7 @@ public CaptureFilter build() { this.id, this.lifecycleState, this.filterType, + this.systemTags, this.timeCreated, this.vtapCaptureFilterRules, this.flowLogCaptureFilterRules); @@ -303,6 +327,9 @@ public Builder copy(CaptureFilter model) { if (model.wasPropertyExplicitlySet("filterType")) { this.filterType(model.getFilterType()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -548,6 +575,24 @@ public FilterType getFilterType() { return filterType; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the capture filter was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -621,6 +666,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", filterType=").append(String.valueOf(this.filterType)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vtapCaptureFilterRules=").append(String.valueOf(this.vtapCaptureFilterRules)); sb.append(", flowLogCaptureFilterRules=") @@ -646,6 +692,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.filterType, other.filterType) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals( this.vtapCaptureFilterRules, other.vtapCaptureFilterRules) @@ -669,6 +716,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.filterType == null ? 43 : this.filterType.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java index 45387cc941..25f0a3305e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java @@ -42,6 +42,7 @@ public final class DhcpOptions extends com.oracle.bmc.http.internal.ExplicitlySe "id", "lifecycleState", "options", + "systemTags", "timeCreated", "vcnId", "domainNameType" @@ -54,6 +55,7 @@ public DhcpOptions( String id, LifecycleState lifecycleState, java.util.List options, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId, DomainNameType domainNameType) { @@ -65,6 +67,7 @@ public DhcpOptions( this.id = id; this.lifecycleState = lifecycleState; this.options = options; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; this.domainNameType = domainNameType; @@ -205,6 +208,26 @@ public Builder options(java.util.List options) { this.__explicitlySet__.add("options"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * Date and time the set of DHCP options was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -273,6 +296,7 @@ public DhcpOptions build() { this.id, this.lifecycleState, this.options, + this.systemTags, this.timeCreated, this.vcnId, this.domainNameType); @@ -305,6 +329,9 @@ public Builder copy(DhcpOptions model) { if (model.wasPropertyExplicitlySet("options")) { this.options(model.getOptions()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -497,6 +524,24 @@ public java.util.List getOptions() { return options; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * Date and time the set of DHCP options was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -615,6 +660,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", options=").append(String.valueOf(this.options)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(", domainNameType=").append(String.valueOf(this.domainNameType)); @@ -639,6 +685,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.options, other.options) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.domainNameType, other.domainNameType) @@ -660,6 +707,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.options == null ? 43 : this.options.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/HostGroupConfiguration.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/HostGroupConfiguration.java index e6e49587c4..72eec8cc0e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/HostGroupConfiguration.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/HostGroupConfiguration.java @@ -22,13 +22,24 @@ public final class HostGroupConfiguration extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"target", "firmwareBundleId", "recycleLevel", "state"}) + @java.beans.ConstructorProperties({ + "target", + "firmwareBundleId", + "recycleLevel", + "quickRecycleSettings", + "state" + }) public HostGroupConfiguration( - String target, String firmwareBundleId, RecycleLevel recycleLevel, State state) { + String target, + String firmwareBundleId, + RecycleLevel recycleLevel, + QuickRecycleSettings quickRecycleSettings, + State state) { super(); this.target = target; this.firmwareBundleId = firmwareBundleId; this.recycleLevel = recycleLevel; + this.quickRecycleSettings = quickRecycleSettings; this.state = state; } @@ -88,6 +99,15 @@ public Builder recycleLevel(RecycleLevel recycleLevel) { this.__explicitlySet__.add("recycleLevel"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("quickRecycleSettings") + private QuickRecycleSettings quickRecycleSettings; + + public Builder quickRecycleSettings(QuickRecycleSettings quickRecycleSettings) { + this.quickRecycleSettings = quickRecycleSettings; + this.__explicitlySet__.add("quickRecycleSettings"); + return this; + } /** * The state of the host group configuration. **/ @@ -111,7 +131,11 @@ public Builder state(State state) { public HostGroupConfiguration build() { HostGroupConfiguration model = new HostGroupConfiguration( - this.target, this.firmwareBundleId, this.recycleLevel, this.state); + this.target, + this.firmwareBundleId, + this.recycleLevel, + this.quickRecycleSettings, + this.state); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -129,6 +153,9 @@ public Builder copy(HostGroupConfiguration model) { if (model.wasPropertyExplicitlySet("recycleLevel")) { this.recycleLevel(model.getRecycleLevel()); } + if (model.wasPropertyExplicitlySet("quickRecycleSettings")) { + this.quickRecycleSettings(model.getQuickRecycleSettings()); + } if (model.wasPropertyExplicitlySet("state")) { this.state(model.getState()); } @@ -246,6 +273,13 @@ public RecycleLevel getRecycleLevel() { return recycleLevel; } + @com.fasterxml.jackson.annotation.JsonProperty("quickRecycleSettings") + private final QuickRecycleSettings quickRecycleSettings; + + public QuickRecycleSettings getQuickRecycleSettings() { + return quickRecycleSettings; + } + /** * The state of the host group configuration. **/ @@ -324,6 +358,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("target=").append(String.valueOf(this.target)); sb.append(", firmwareBundleId=").append(String.valueOf(this.firmwareBundleId)); sb.append(", recycleLevel=").append(String.valueOf(this.recycleLevel)); + sb.append(", quickRecycleSettings=").append(String.valueOf(this.quickRecycleSettings)); sb.append(", state=").append(String.valueOf(this.state)); sb.append(")"); return sb.toString(); @@ -342,6 +377,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.target, other.target) && java.util.Objects.equals(this.firmwareBundleId, other.firmwareBundleId) && java.util.Objects.equals(this.recycleLevel, other.recycleLevel) + && java.util.Objects.equals(this.quickRecycleSettings, other.quickRecycleSettings) && java.util.Objects.equals(this.state, other.state) && super.equals(other); } @@ -355,6 +391,11 @@ public int hashCode() { (result * PRIME) + (this.firmwareBundleId == null ? 43 : this.firmwareBundleId.hashCode()); result = (result * PRIME) + (this.recycleLevel == null ? 43 : this.recycleLevel.hashCode()); + result = + (result * PRIME) + + (this.quickRecycleSettings == null + ? 43 + : this.quickRecycleSettings.hashCode()); result = (result * PRIME) + (this.state == null ? 43 : this.state.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java index 90e52e137f..24189cc1a8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java @@ -34,6 +34,7 @@ public final class InternetGateway extends com.oracle.bmc.http.internal.Explicit "id", "isEnabled", "lifecycleState", + "systemTags", "timeCreated", "vcnId", "routeTableId" @@ -46,6 +47,7 @@ public InternetGateway( String id, Boolean isEnabled, LifecycleState lifecycleState, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId, String routeTableId) { @@ -57,6 +59,7 @@ public InternetGateway( this.id = id; this.isEnabled = isEnabled; this.lifecycleState = lifecycleState; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; this.routeTableId = routeTableId; @@ -201,6 +204,26 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the internet gateway was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -269,6 +292,7 @@ public InternetGateway build() { this.id, this.isEnabled, this.lifecycleState, + this.systemTags, this.timeCreated, this.vcnId, this.routeTableId); @@ -301,6 +325,9 @@ public Builder copy(InternetGateway model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -497,6 +524,24 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the internet gateway was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -566,6 +611,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(", routeTableId=").append(String.valueOf(this.routeTableId)); @@ -590,6 +636,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.isEnabled, other.isEnabled) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.routeTableId, other.routeTableId) @@ -611,6 +658,7 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + (this.routeTableId == null ? 43 : this.routeTableId.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java index 873818fb3c..ac228aedd6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java @@ -37,6 +37,7 @@ public final class Ipv6 extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "cidrPrefixLength", "lifecycleState", "subnetId", + "systemTags", "timeCreated", "vnicId", "ipState", @@ -54,6 +55,7 @@ public Ipv6( Integer cidrPrefixLength, LifecycleState lifecycleState, String subnetId, + java.util.Map> systemTags, java.util.Date timeCreated, String vnicId, IpState ipState, @@ -70,6 +72,7 @@ public Ipv6( this.cidrPrefixLength = cidrPrefixLength; this.lifecycleState = lifecycleState; this.subnetId = subnetId; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vnicId = vnicId; this.ipState = ipState; @@ -257,6 +260,26 @@ public Builder subnetId(String subnetId) { this.__explicitlySet__.add("subnetId"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the IPv6 was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -395,6 +418,7 @@ public Ipv6 build() { this.cidrPrefixLength, this.lifecycleState, this.subnetId, + this.systemTags, this.timeCreated, this.vnicId, this.ipState, @@ -436,6 +460,9 @@ public Builder copy(Ipv6 model) { if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -677,6 +704,24 @@ public String getSubnetId() { return subnetId; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the IPv6 was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -911,6 +956,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", cidrPrefixLength=").append(String.valueOf(this.cidrPrefixLength)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vnicId=").append(String.valueOf(this.vnicId)); sb.append(", ipState=").append(String.valueOf(this.ipState)); @@ -940,6 +986,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.cidrPrefixLength, other.cidrPrefixLength) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vnicId, other.vnicId) && java.util.Objects.equals(this.ipState, other.ipState) @@ -968,6 +1015,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vnicId == null ? 43 : this.vnicId.hashCode()); result = (result * PRIME) + (this.ipState == null ? 43 : this.ipState.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/NetworkSecurityGroup.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/NetworkSecurityGroup.java index 0c6f995e61..938c0f966b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/NetworkSecurityGroup.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/NetworkSecurityGroup.java @@ -66,6 +66,7 @@ public final class NetworkSecurityGroup extends com.oracle.bmc.http.internal.Exp "freeformTags", "id", "lifecycleState", + "systemTags", "timeCreated", "vcnId" }) @@ -76,6 +77,7 @@ public NetworkSecurityGroup( java.util.Map freeformTags, String id, LifecycleState lifecycleState, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId) { super(); @@ -85,6 +87,7 @@ public NetworkSecurityGroup( this.freeformTags = freeformTags; this.id = id; this.lifecycleState = lifecycleState; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; } @@ -210,6 +213,26 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the network security group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -261,6 +284,7 @@ public NetworkSecurityGroup build() { this.freeformTags, this.id, this.lifecycleState, + this.systemTags, this.timeCreated, this.vcnId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -289,6 +313,9 @@ public Builder copy(NetworkSecurityGroup model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -466,6 +493,24 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the network security group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -520,6 +565,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(")"); @@ -542,6 +588,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && super.equals(other); @@ -561,6 +608,7 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/QuickRecycleSettings.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/QuickRecycleSettings.java new file mode 100644 index 0000000000..a5f07d443c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/QuickRecycleSettings.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.core.model; + +/** + * Additional quick recycle settings. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = QuickRecycleSettings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuickRecycleSettings extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"nvmeWipe"}) + public QuickRecycleSettings(Boolean nvmeWipe) { + super(); + this.nvmeWipe = nvmeWipe; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Whether to wipe NVMe data during quick recycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nvmeWipe") + private Boolean nvmeWipe; + + /** + * Whether to wipe NVMe data during quick recycle. + * @param nvmeWipe the value to set + * @return this builder + **/ + public Builder nvmeWipe(Boolean nvmeWipe) { + this.nvmeWipe = nvmeWipe; + this.__explicitlySet__.add("nvmeWipe"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public QuickRecycleSettings build() { + QuickRecycleSettings model = new QuickRecycleSettings(this.nvmeWipe); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuickRecycleSettings model) { + if (model.wasPropertyExplicitlySet("nvmeWipe")) { + this.nvmeWipe(model.getNvmeWipe()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Whether to wipe NVMe data during quick recycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nvmeWipe") + private final Boolean nvmeWipe; + + /** + * Whether to wipe NVMe data during quick recycle. + * @return the value + **/ + public Boolean getNvmeWipe() { + return nvmeWipe; + } + + @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("QuickRecycleSettings("); + sb.append("super=").append(super.toString()); + sb.append("nvmeWipe=").append(String.valueOf(this.nvmeWipe)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof QuickRecycleSettings)) { + return false; + } + + QuickRecycleSettings other = (QuickRecycleSettings) o; + return java.util.Objects.equals(this.nvmeWipe, other.nvmeWipe) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.nvmeWipe == null ? 43 : this.nvmeWipe.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteTable.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteTable.java index 7ae35e5b7e..c666198f08 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteTable.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteTable.java @@ -34,6 +34,7 @@ public final class RouteTable extends com.oracle.bmc.http.internal.ExplicitlySet "id", "lifecycleState", "routeRules", + "systemTags", "timeCreated", "vcnId" }) @@ -45,6 +46,7 @@ public RouteTable( String id, LifecycleState lifecycleState, java.util.List routeRules, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId) { super(); @@ -55,6 +57,7 @@ public RouteTable( this.id = id; this.lifecycleState = lifecycleState; this.routeRules = routeRules; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; } @@ -196,6 +199,26 @@ public Builder routeRules(java.util.List routeRules) { this.__explicitlySet__.add("routeRules"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the route table was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -248,6 +271,7 @@ public RouteTable build() { this.id, this.lifecycleState, this.routeRules, + this.systemTags, this.timeCreated, this.vcnId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -279,6 +303,9 @@ public Builder copy(RouteTable model) { if (model.wasPropertyExplicitlySet("routeRules")) { this.routeRules(model.getRouteRules()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -470,6 +497,24 @@ public java.util.List getRouteRules() { return routeRules; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the route table was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -525,6 +570,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", routeRules=").append(String.valueOf(this.routeRules)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(")"); @@ -548,6 +594,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.routeRules, other.routeRules) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && super.equals(other); @@ -568,6 +615,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.routeRules == null ? 43 : this.routeRules.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java index fa2e9efc81..4025047a5c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java @@ -45,6 +45,7 @@ public final class SecurityList extends com.oracle.bmc.http.internal.ExplicitlyS "id", "ingressSecurityRules", "lifecycleState", + "systemTags", "timeCreated", "vcnId" }) @@ -57,6 +58,7 @@ public SecurityList( String id, java.util.List ingressSecurityRules, LifecycleState lifecycleState, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId) { super(); @@ -68,6 +70,7 @@ public SecurityList( this.id = id; this.ingressSecurityRules = ingressSecurityRules; this.lifecycleState = lifecycleState; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; } @@ -224,6 +227,26 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the security list was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -277,6 +300,7 @@ public SecurityList build() { this.id, this.ingressSecurityRules, this.lifecycleState, + this.systemTags, this.timeCreated, this.vcnId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -311,6 +335,9 @@ public Builder copy(SecurityList model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -514,6 +541,24 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the security list was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -570,6 +615,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", ingressSecurityRules=").append(String.valueOf(this.ingressSecurityRules)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(")"); @@ -594,6 +640,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.ingressSecurityRules, other.ingressSecurityRules) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && super.equals(other); @@ -623,6 +670,7 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java index 48f8c225d5..ca684f32f4 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java @@ -48,6 +48,7 @@ public final class Subnet extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "routeTableId", "securityListIds", "subnetDomainName", + "systemTags", "timeCreated", "vcnId", "virtualRouterIp", @@ -73,6 +74,7 @@ public Subnet( String routeTableId, java.util.List securityListIds, String subnetDomainName, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId, String virtualRouterIp, @@ -97,6 +99,7 @@ public Subnet( this.routeTableId = routeTableId; this.securityListIds = securityListIds; this.subnetDomainName = subnetDomainName; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; this.virtualRouterIp = virtualRouterIp; @@ -564,6 +567,26 @@ public Builder subnetDomainName(String subnetDomainName) { this.__explicitlySet__.add("subnetDomainName"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the subnet was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -672,6 +695,7 @@ public Subnet build() { this.routeTableId, this.securityListIds, this.subnetDomainName, + this.systemTags, this.timeCreated, this.vcnId, this.virtualRouterIp, @@ -741,6 +765,9 @@ public Builder copy(Subnet model) { if (model.wasPropertyExplicitlySet("subnetDomainName")) { this.subnetDomainName(model.getSubnetDomainName()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -1239,6 +1266,24 @@ public String getSubnetDomainName() { return subnetDomainName; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the subnet was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -1347,6 +1392,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", routeTableId=").append(String.valueOf(this.routeTableId)); sb.append(", securityListIds=").append(String.valueOf(this.securityListIds)); sb.append(", subnetDomainName=").append(String.valueOf(this.subnetDomainName)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(", virtualRouterIp=").append(String.valueOf(this.virtualRouterIp)); @@ -1386,6 +1432,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.routeTableId, other.routeTableId) && java.util.Objects.equals(this.securityListIds, other.securityListIds) && java.util.Objects.equals(this.subnetDomainName, other.subnetDomainName) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.virtualRouterIp, other.virtualRouterIp) @@ -1448,6 +1495,7 @@ public int hashCode() { result = (result * PRIME) + (this.subnetDomainName == null ? 43 : this.subnetDomainName.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = 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 a9099c96a2..d42a21a674 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 @@ -39,6 +39,7 @@ public final class Vcn extends com.oracle.bmc.http.internal.ExplicitlySetBmcMode "dnsLabel", "freeformTags", "securityAttributes", + "systemTags", "id", "ipv6CidrBlocks", "lifecycleState", @@ -60,6 +61,7 @@ public Vcn( String dnsLabel, java.util.Map freeformTags, java.util.Map> securityAttributes, + java.util.Map> systemTags, String id, java.util.List ipv6CidrBlocks, LifecycleState lifecycleState, @@ -80,6 +82,7 @@ public Vcn( this.dnsLabel = dnsLabel; this.freeformTags = freeformTags; this.securityAttributes = securityAttributes; + this.systemTags = systemTags; this.id = id; this.ipv6CidrBlocks = ipv6CidrBlocks; this.lifecycleState = lifecycleState; @@ -370,6 +373,26 @@ public Builder securityAttributes( this.__explicitlySet__.add("securityAttributes"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The VCN's Oracle ID ([OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). **/ @@ -512,6 +535,7 @@ public Vcn build() { this.dnsLabel, this.freeformTags, this.securityAttributes, + this.systemTags, this.id, this.ipv6CidrBlocks, this.lifecycleState, @@ -565,6 +589,9 @@ public Builder copy(Vcn model) { if (model.wasPropertyExplicitlySet("securityAttributes")) { this.securityAttributes(model.getSecurityAttributes()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } @@ -850,6 +877,24 @@ public java.util.Map> getSecurityAttribute return securityAttributes; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The VCN's Oracle ID ([OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). **/ @@ -1038,6 +1083,7 @@ public String toString(boolean includeByteArrayContents) { 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(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", ipv6CidrBlocks=").append(String.valueOf(this.ipv6CidrBlocks)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -1071,6 +1117,7 @@ public boolean equals(Object o) { && 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.systemTags, other.systemTags) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.ipv6CidrBlocks, other.ipv6CidrBlocks) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -1121,6 +1168,7 @@ public int hashCode() { + (this.securityAttributes == null ? 43 : this.securityAttributes.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.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/Vlan.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vlan.java index 973eb9f701..93ced55cd1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vlan.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vlan.java @@ -41,6 +41,7 @@ public final class Vlan extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "nsgIds", "vlanTag", "routeTableId", + "systemTags", "timeCreated", "vcnId" }) @@ -56,6 +57,7 @@ public Vlan( java.util.List nsgIds, Integer vlanTag, String routeTableId, + java.util.Map> systemTags, java.util.Date timeCreated, String vcnId) { super(); @@ -70,6 +72,7 @@ public Vlan( this.nsgIds = nsgIds; this.vlanTag = vlanTag; this.routeTableId = routeTableId; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.vcnId = vcnId; } @@ -303,6 +306,26 @@ public Builder routeTableId(String routeTableId) { this.__explicitlySet__.add("routeTableId"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the VLAN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -359,6 +382,7 @@ public Vlan build() { this.nsgIds, this.vlanTag, this.routeTableId, + this.systemTags, this.timeCreated, this.vcnId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -402,6 +426,9 @@ public Builder copy(Vlan model) { if (model.wasPropertyExplicitlySet("routeTableId")) { this.routeTableId(model.getRouteTableId()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -678,6 +705,24 @@ public String getRouteTableId() { return routeTableId; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the VLAN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -737,6 +782,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", vlanTag=").append(String.valueOf(this.vlanTag)); sb.append(", routeTableId=").append(String.valueOf(this.routeTableId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(")"); @@ -764,6 +810,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.vlanTag, other.vlanTag) && java.util.Objects.equals(this.routeTableId, other.routeTableId) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.vcnId, other.vcnId) && super.equals(other); @@ -792,6 +839,7 @@ public int hashCode() { result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.vlanTag == null ? 43 : this.vlanTag.hashCode()); result = (result * PRIME) + (this.routeTableId == null ? 43 : this.routeTableId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + super.hashCode(); 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 c5eef13c89..6aef9c9bea 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 @@ -58,6 +58,7 @@ public final class Vnic extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "publicIp", "skipSourceDestCheck", "subnetId", + "systemTags", "timeCreated", "ipv6Addresses", "routeTableId" @@ -80,6 +81,7 @@ public Vnic( String publicIp, Boolean skipSourceDestCheck, String subnetId, + java.util.Map> systemTags, java.util.Date timeCreated, java.util.List ipv6Addresses, String routeTableId) { @@ -101,6 +103,7 @@ public Vnic( this.publicIp = publicIp; this.skipSourceDestCheck = skipSourceDestCheck; this.subnetId = subnetId; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.ipv6Addresses = ipv6Addresses; this.routeTableId = routeTableId; @@ -510,6 +513,26 @@ public Builder subnetId(String subnetId) { this.__explicitlySet__.add("subnetId"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the VNIC was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -598,6 +621,7 @@ public Vnic build() { this.publicIp, this.skipSourceDestCheck, this.subnetId, + this.systemTags, this.timeCreated, this.ipv6Addresses, this.routeTableId); @@ -660,6 +684,9 @@ public Builder copy(Vnic model) { if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -1100,6 +1127,24 @@ public String getSubnetId() { return subnetId; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the VNIC was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -1189,6 +1234,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", publicIp=").append(String.valueOf(this.publicIp)); sb.append(", skipSourceDestCheck=").append(String.valueOf(this.skipSourceDestCheck)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", ipv6Addresses=").append(String.valueOf(this.ipv6Addresses)); sb.append(", routeTableId=").append(String.valueOf(this.routeTableId)); @@ -1223,6 +1269,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.publicIp, other.publicIp) && java.util.Objects.equals(this.skipSourceDestCheck, other.skipSourceDestCheck) && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.ipv6Addresses, other.ipv6Addresses) && java.util.Objects.equals(this.routeTableId, other.routeTableId) @@ -1268,6 +1315,7 @@ public int hashCode() { ? 43 : this.skipSourceDestCheck.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vtap.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vtap.java index 70d2f5ce23..3cc0c4342a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vtap.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vtap.java @@ -32,6 +32,7 @@ public final class Vtap extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "id", "lifecycleState", "lifecycleStateDetails", + "systemTags", "timeCreated", "sourceId", "targetId", @@ -56,6 +57,7 @@ public Vtap( String id, LifecycleState lifecycleState, LifecycleStateDetails lifecycleStateDetails, + java.util.Map> systemTags, java.util.Date timeCreated, String sourceId, String targetId, @@ -79,6 +81,7 @@ public Vtap( this.id = id; this.lifecycleState = lifecycleState; this.lifecycleStateDetails = lifecycleStateDetails; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.sourceId = sourceId; this.targetId = targetId; @@ -246,6 +249,26 @@ public Builder lifecycleStateDetails(LifecycleStateDetails lifecycleStateDetails this.__explicitlySet__.add("lifecycleStateDetails"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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; + } /** * The date and time the VTAP was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -519,6 +542,7 @@ public Vtap build() { this.id, this.lifecycleState, this.lifecycleStateDetails, + this.systemTags, this.timeCreated, this.sourceId, this.targetId, @@ -565,6 +589,9 @@ public Builder copy(Vtap model) { if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { this.lifecycleStateDetails(model.getLifecycleStateDetails()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -853,6 +880,24 @@ public LifecycleStateDetails getLifecycleStateDetails() { return lifecycleStateDetails; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code { "orcl-cloud": { "free-tier-retained": "true" } }} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the VTAP was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). *

@@ -1304,6 +1349,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", sourceId=").append(String.valueOf(this.sourceId)); sb.append(", targetId=").append(String.valueOf(this.targetId)); @@ -1342,6 +1388,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.sourceId, other.sourceId) && java.util.Objects.equals(this.targetId, other.targetId) @@ -1382,6 +1429,7 @@ public int hashCode() { + (this.lifecycleStateDetails == null ? 43 : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.sourceId == null ? 43 : this.sourceId.hashCode()); result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); diff --git a/bmc-costad/pom.xml b/bmc-costad/pom.xml index a0d8ef8ed0..bb87258137 100644 --- a/bmc-costad/pom.xml +++ b/bmc-costad/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-costad @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-dashboardservice/pom.xml b/bmc-dashboardservice/pom.xml index e8fed8bfe7..9c46648f55 100644 --- a/bmc-dashboardservice/pom.xml +++ b/bmc-dashboardservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dashboardservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 7e777895a7..6954983a7e 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.95.0 + 2.97.0 diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/Database.java b/bmc-database/src/main/java/com/oracle/bmc/database/Database.java index 37fea73727..fc629c1f57 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/Database.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/Database.java @@ -2618,6 +2618,20 @@ GetAdvancedClusterFileSystemResponse getAdvancedClusterFileSystem( GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( GetAutonomousContainerDatabaseRequest request); + /** + * Gets information about the specified Autonomous Container Database backup. + * + * @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 can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * 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 GetAutonomousContainerDatabaseBackup API. + */ + GetAutonomousContainerDatabaseBackupResponse getAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request); + /** * **Deprecated.** Use the {@link #getAutonomousContainerDatabase(GetAutonomousContainerDatabaseRequest) getAutonomousContainerDatabase} operation to get the details of an Autonomous Container Database (ACD) enabled with Autonomous Data Guard associated with the specified ACD. * @@ -3922,6 +3936,21 @@ ListAutonomousDatabaseSoftwareImagesResponse listAutonomousDatabaseSoftwareImage */ ListAutonomousDatabasesResponse listAutonomousDatabases(ListAutonomousDatabasesRequest request); + /** + * Gets a list of Autonomous Databases associated with backups at the given timestamp for the specified Autonomous Container Database. If `compartmentId` is provided, filters to that compartment; otherwise, uses the container's 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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * 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 ListAutonomousDatabasesInAutonomousContainerDatabaseBackup API. + */ + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request); + /** * Gets a list of supported Autonomous AI Database versions. Note that preview version software is only available for * Autonomous AI Database Serverless (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) databases. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java index c0c9fab0a2..2613669b21 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java @@ -3365,6 +3365,25 @@ java.util.concurrent.Future getApplicationVip( GetAutonomousContainerDatabaseResponse> handler); + /** + * Gets information about the specified Autonomous Container Database backup. + * + * + * @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 + getAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + handler); + /** * **Deprecated.** Use the {@link #getAutonomousContainerDatabase(GetAutonomousContainerDatabaseRequest, Consumer, Consumer) getAutonomousContainerDatabase} operation to get the details of an Autonomous Container Database (ACD) enabled with Autonomous Data Guard associated with the specified ACD. * @@ -5047,6 +5066,25 @@ java.util.concurrent.Future listAutonomousDatab ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse> handler); + /** + * Gets a list of Autonomous Databases associated with backups at the given timestamp for the specified Autonomous Container Database. If `compartmentId` is provided, filters to that compartment; otherwise, uses the container's 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 + listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + handler); + /** * Gets a list of supported Autonomous AI Database versions. Note that preview version software is only available for * Autonomous AI Database Serverless (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) databases. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java index 2ef6cd4f49..d01708f451 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java @@ -10295,6 +10295,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + handler) { + LOG.trace("Called async getAutonomousContainerDatabaseBackup"); + final GetAutonomousContainerDatabaseBackupRequest interceptedRequest = + GetAutonomousContainerDatabaseBackupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousContainerDatabaseBackupConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousContainerDatabaseBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseBackup/GetAutonomousContainerDatabaseBackup"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousContainerDatabaseBackupResponse> + transformer = + GetAutonomousContainerDatabaseBackupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getAutonomousContainerDatabaseDataguardAssociation( @@ -15024,6 +15078,64 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + handler) { + LOG.trace("Called async listAutonomousDatabasesInAutonomousContainerDatabaseBackup"); + final ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest interceptedRequest = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter + .interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListAutonomousDatabasesInAutonomousContainerDatabaseBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseInBackup/ListAutonomousDatabasesInAutonomousContainerDatabaseBackup"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + transformer = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>, + java.util.concurrent.Future< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listAutonomousDbPreviewVersions( diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java index 8319a7ff76..db710c1ad2 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java @@ -8204,6 +8204,46 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( }); } + @Override + public GetAutonomousContainerDatabaseBackupResponse getAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request) { + LOG.trace("Called getAutonomousContainerDatabaseBackup"); + final GetAutonomousContainerDatabaseBackupRequest interceptedRequest = + GetAutonomousContainerDatabaseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousContainerDatabaseBackupConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousContainerDatabaseBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseBackup/GetAutonomousContainerDatabaseBackup"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousContainerDatabaseBackupResponse> + transformer = + GetAutonomousContainerDatabaseBackupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetAutonomousContainerDatabaseDataguardAssociationResponse getAutonomousContainerDatabaseDataguardAssociation( @@ -11843,6 +11883,49 @@ public ListAutonomousDatabasesResponse listAutonomousDatabases( }); } + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request) { + LOG.trace("Called listAutonomousDatabasesInAutonomousContainerDatabaseBackup"); + final ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest interceptedRequest = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter + .interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListAutonomousDatabasesInAutonomousContainerDatabaseBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseInBackup/ListAutonomousDatabasesInAutonomousContainerDatabaseBackup"); + java.util.function.Function< + javax.ws.rs.core.Response, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + transformer = + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListAutonomousDbPreviewVersionsResponse listAutonomousDbPreviewVersions( ListAutonomousDbPreviewVersionsRequest request) { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java index b1984a622e..6fbc4fda2c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java @@ -1672,6 +1672,161 @@ public ListAutonomousDatabasesResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listAutonomousDatabasesInAutonomousContainerDatabaseBackup 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 + listAutonomousDatabasesInAutonomousContainerDatabaseBackupResponseIterator( + final ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.Builder, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>( + new java.util.function.Supplier< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .Builder>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.Builder + get() { + return ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .builder() + .copy(request); + } + }, + new java.util.function.Function< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse, + String>() { + @Override + public String apply( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .Builder>, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .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< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse apply( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + return client.listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.AutonomousDatabaseInBackupSummary} objects + * contained in responses from the listAutonomousDatabasesInAutonomousContainerDatabaseBackup 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.database.model.AutonomousDatabaseInBackupSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAutonomousDatabasesInAutonomousContainerDatabaseBackupRecordIterator( + final ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.Builder, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse, + com.oracle.bmc.database.model.AutonomousDatabaseInBackupSummary>( + new java.util.function.Supplier< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .Builder>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.Builder + get() { + return ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .builder() + .copy(request); + } + }, + new java.util.function.Function< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse, + String>() { + @Override + public String apply( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .Builder>, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + .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< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>() { + @Override + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse apply( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + return client.listAutonomousDatabasesInAutonomousContainerDatabaseBackup( + request); + } + }, + new java.util.function.Function< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse, + java.util.List< + com.oracle.bmc.database.model + .AutonomousDatabaseInBackupSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.AutonomousDatabaseInBackupSummary> + apply( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + response) { + return response.getAutonomousDatabaseInBackupCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listAutonomousDbPreviewVersions operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java index 26430612ef..81a7ccc7c0 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java @@ -10657,6 +10657,131 @@ public boolean test(GetAutonomousContainerDatabaseResponse response) { 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< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + forAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + .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 forAutonomousContainerDatabaseBackup( + 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< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + forAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup.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 forAutonomousContainerDatabaseBackup( + 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< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + forAutonomousContainerDatabaseBackup( + GetAutonomousContainerDatabaseBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + .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 forAutonomousContainerDatabaseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousContainerDatabaseBackup. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse> + forAutonomousContainerDatabaseBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousContainerDatabaseBackupRequest request, + final com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + .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< + GetAutonomousContainerDatabaseBackupRequest, + GetAutonomousContainerDatabaseBackupResponse>() { + @Override + public GetAutonomousContainerDatabaseBackupResponse apply( + GetAutonomousContainerDatabaseBackupRequest request) { + return client.getAutonomousContainerDatabaseBackup(request); + } + }, + new java.util.function.Predicate< + GetAutonomousContainerDatabaseBackupResponse>() { + @Override + public boolean test( + GetAutonomousContainerDatabaseBackupResponse response) { + return targetStatesSet.contains( + response.getAutonomousContainerDatabaseBackup() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + .LifecycleState.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousContainerDatabaseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousContainerDatabaseBackupConverter.java new file mode 100644 index 0000000000..94ccbfa753 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousContainerDatabaseBackupConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetAutonomousContainerDatabaseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetAutonomousContainerDatabaseBackupConverter.class); + + public static com.oracle.bmc.database.requests.GetAutonomousContainerDatabaseBackupRequest + interceptRequest( + com.oracle.bmc.database.requests.GetAutonomousContainerDatabaseBackupRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetAutonomousContainerDatabaseBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseBackupId(), + "autonomousContainerDatabaseBackupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabaseBackups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseBackupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetAutonomousContainerDatabaseBackupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetAutonomousContainerDatabaseBackupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse>() { + @Override + public com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetAutonomousContainerDatabaseBackupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabaseBackup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabaseBackup + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabaseBackup + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabaseBackup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse + .Builder + builder = + com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabaseBackup(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .GetAutonomousContainerDatabaseBackupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java index edcd153ef9..f818eec3d9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java @@ -130,6 +130,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getInfrastructureType().getValue())); } + if (request.getIsPitrEligible() != null) { + target = + target.queryParam( + "isPitrEligible", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsPitrEligible())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.java new file mode 100644 index 0000000000..68fc1b9284 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupConverter.class); + + public static com.oracle.bmc.database.requests + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + interceptRequest( + com.oracle.bmc.database.requests + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId is required"); + Validate.notNull(request.getTimeStampRequested(), "timeStampRequested is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabaseBackups") + .path("listAutonomousDatabasesInBackup"); + + target = + target.queryParam( + "autonomousContainerDatabaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAutonomousContainerDatabaseId())); + + target = + target.queryParam( + "timeStampRequested", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeStampRequested())); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousDatabaseInBackupCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousDatabaseInBackupCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousDatabaseInBackupCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousDatabaseInBackupCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousDatabaseInBackupCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabasesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabasesConverter.java index f8db2d7fde..517ed8e305 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabasesConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabasesConverter.java @@ -104,6 +104,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getDbName())); } + if (request.getManagedAutoFailover() != null) { + target = + target.queryParam( + "managedAutoFailover", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getManagedAutoFailover().getValue())); + } + + if (request.getFailoverTargets() != null) { + target = + target.queryParam( + "failoverTargets", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFailoverTargets().getValue())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutoFailoverConfiguration.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutoFailoverConfiguration.java new file mode 100644 index 0000000000..2ce96c18e7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutoFailoverConfiguration.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.model; + +/** + * The properties for defining auto failover configuration. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutoFailoverConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutoFailoverConfiguration + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"managedAutoFailover", "failoverTargets"}) + public AutoFailoverConfiguration( + ManagedAutoFailover managedAutoFailover, java.util.List failoverTargets) { + super(); + this.managedAutoFailover = managedAutoFailover; + this.failoverTargets = failoverTargets; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The state of managed auto failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailover") + private ManagedAutoFailover managedAutoFailover; + + /** + * The state of managed auto failover. + * @param managedAutoFailover the value to set + * @return this builder + **/ + public Builder managedAutoFailover(ManagedAutoFailover managedAutoFailover) { + this.managedAutoFailover = managedAutoFailover; + this.__explicitlySet__.add("managedAutoFailover"); + return this; + } + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failoverTargets") + private java.util.List failoverTargets; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + * @param failoverTargets the value to set + * @return this builder + **/ + public Builder failoverTargets(java.util.List failoverTargets) { + this.failoverTargets = failoverTargets; + this.__explicitlySet__.add("failoverTargets"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutoFailoverConfiguration build() { + AutoFailoverConfiguration model = + new AutoFailoverConfiguration(this.managedAutoFailover, this.failoverTargets); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutoFailoverConfiguration model) { + if (model.wasPropertyExplicitlySet("managedAutoFailover")) { + this.managedAutoFailover(model.getManagedAutoFailover()); + } + if (model.wasPropertyExplicitlySet("failoverTargets")) { + this.failoverTargets(model.getFailoverTargets()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The state of managed auto failover. + **/ + public enum ManagedAutoFailover { + Enable("ENABLE"), + Disable("DISABLE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedAutoFailover v : ManagedAutoFailover.values()) { + map.put(v.getValue(), v); + } + } + + ManagedAutoFailover(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedAutoFailover create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ManagedAutoFailover: " + key); + } + }; + /** + * The state of managed auto failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailover") + private final ManagedAutoFailover managedAutoFailover; + + /** + * The state of managed auto failover. + * @return the value + **/ + public ManagedAutoFailover getManagedAutoFailover() { + return managedAutoFailover; + } + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failoverTargets") + private final java.util.List failoverTargets; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + * @return the value + **/ + public java.util.List getFailoverTargets() { + return failoverTargets; + } + + @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("AutoFailoverConfiguration("); + sb.append("super=").append(super.toString()); + sb.append("managedAutoFailover=").append(String.valueOf(this.managedAutoFailover)); + sb.append(", failoverTargets=").append(String.valueOf(this.failoverTargets)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutoFailoverConfiguration)) { + return false; + } + + AutoFailoverConfiguration other = (AutoFailoverConfiguration) o; + return java.util.Objects.equals(this.managedAutoFailover, other.managedAutoFailover) + && java.util.Objects.equals(this.failoverTargets, other.failoverTargets) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.managedAutoFailover == null + ? 43 + : this.managedAutoFailover.hashCode()); + result = + (result * PRIME) + + (this.failoverTargets == null ? 43 : this.failoverTargets.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackup.java index 734ca19a21..4899d3bfa6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackup.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackup.java @@ -41,7 +41,9 @@ public final class AutonomousContainerDatabaseBackup "freeformTags", "definedTags", "systemTags", - "autonomousDatabases" + "autonomousDatabases", + "dbVersion", + "backupDestinationDetails" }) public AutonomousContainerDatabaseBackup( String id, @@ -61,7 +63,9 @@ public AutonomousContainerDatabaseBackup( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, - java.util.List autonomousDatabases) { + java.util.List autonomousDatabases, + String dbVersion, + BackupDestinationDetails backupDestinationDetails) { super(); this.id = id; this.compartmentId = compartmentId; @@ -81,6 +85,8 @@ public AutonomousContainerDatabaseBackup( this.definedTags = definedTags; this.systemTags = systemTags; this.autonomousDatabases = autonomousDatabases; + this.dbVersion = dbVersion; + this.backupDestinationDetails = backupDestinationDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -391,6 +397,43 @@ public Builder autonomousDatabases( this.__explicitlySet__.add("autonomousDatabases"); return this; } + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private BackupDestinationDetails backupDestinationDetails; + + public Builder backupDestinationDetails(BackupDestinationDetails backupDestinationDetails) { + this.backupDestinationDetails = backupDestinationDetails; + this.__explicitlySet__.add("backupDestinationDetails"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -415,7 +458,9 @@ public AutonomousContainerDatabaseBackup build() { this.freeformTags, this.definedTags, this.systemTags, - this.autonomousDatabases); + this.autonomousDatabases, + this.dbVersion, + this.backupDestinationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -478,6 +523,12 @@ public Builder copy(AutonomousContainerDatabaseBackup model) { if (model.wasPropertyExplicitlySet("autonomousDatabases")) { this.autonomousDatabases(model.getAutonomousDatabases()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } + if (model.wasPropertyExplicitlySet("backupDestinationDetails")) { + this.backupDestinationDetails(model.getBackupDestinationDetails()); + } return this; } } @@ -570,7 +621,14 @@ public enum Type { Incremental("INCREMENTAL"), Full("FULL"), VirtualFull("VIRTUAL_FULL"), - ; + + /** + * 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(Type.class); private final String value; private static java.util.Map map; @@ -578,7 +636,9 @@ public enum Type { static { map = new java.util.HashMap<>(); for (Type v : Type.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -596,7 +656,9 @@ public static Type create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid Type: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; } }; /** @@ -678,7 +740,15 @@ public enum LifecycleState { 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; @@ -686,7 +756,9 @@ public enum LifecycleState { static { map = new java.util.HashMap<>(); for (LifecycleState v : LifecycleState.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -704,7 +776,10 @@ public static LifecycleState create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid LifecycleState: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; /** @@ -755,7 +830,15 @@ public Boolean getIsRemoteBackup() { public enum InfrastructureType { Cloud("CLOUD"), CloudAtCustomer("CLOUD_AT_CUSTOMER"), - ; + + /** + * 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(InfrastructureType.class); private final String value; private static java.util.Map map; @@ -763,7 +846,9 @@ public enum InfrastructureType { static { map = new java.util.HashMap<>(); for (InfrastructureType v : InfrastructureType.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -781,7 +866,10 @@ public static InfrastructureType create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid InfrastructureType: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'InfrastructureType', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; /** @@ -870,6 +958,39 @@ public java.util.List getAutonomousDatabases() { return autonomousDatabases; } + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private final BackupDestinationDetails backupDestinationDetails; + + public BackupDestinationDetails getBackupDestinationDetails() { + return backupDestinationDetails; + } + @Override public String toString() { return this.toString(true); @@ -903,6 +1024,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", autonomousDatabases=").append(String.valueOf(this.autonomousDatabases)); + sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", backupDestinationDetails=") + .append(String.valueOf(this.backupDestinationDetails)); sb.append(")"); return sb.toString(); } @@ -936,6 +1060,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.autonomousDatabases, other.autonomousDatabases) + && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals( + this.backupDestinationDetails, other.backupDestinationDetails) && super.equals(other); } @@ -987,6 +1114,12 @@ public int hashCode() { + (this.autonomousDatabases == null ? 43 : this.autonomousDatabases.hashCode()); + result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationDetails == null + ? 43 + : this.backupDestinationDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackupSummary.java index bb88b4e74b..11a742550e 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackupSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseBackupSummary.java @@ -44,7 +44,9 @@ public final class AutonomousContainerDatabaseBackupSummary "freeformTags", "definedTags", "systemTags", - "autonomousDatabases" + "autonomousDatabases", + "dbVersion", + "backupDestinationDetails" }) public AutonomousContainerDatabaseBackupSummary( String id, @@ -64,7 +66,9 @@ public AutonomousContainerDatabaseBackupSummary( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, - java.util.List autonomousDatabases) { + java.util.List autonomousDatabases, + String dbVersion, + BackupDestinationDetails backupDestinationDetails) { super(); this.id = id; this.compartmentId = compartmentId; @@ -84,6 +88,8 @@ public AutonomousContainerDatabaseBackupSummary( this.definedTags = definedTags; this.systemTags = systemTags; this.autonomousDatabases = autonomousDatabases; + this.dbVersion = dbVersion; + this.backupDestinationDetails = backupDestinationDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -394,6 +400,43 @@ public Builder autonomousDatabases( this.__explicitlySet__.add("autonomousDatabases"); return this; } + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private BackupDestinationDetails backupDestinationDetails; + + public Builder backupDestinationDetails(BackupDestinationDetails backupDestinationDetails) { + this.backupDestinationDetails = backupDestinationDetails; + this.__explicitlySet__.add("backupDestinationDetails"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -418,7 +461,9 @@ public AutonomousContainerDatabaseBackupSummary build() { this.freeformTags, this.definedTags, this.systemTags, - this.autonomousDatabases); + this.autonomousDatabases, + this.dbVersion, + this.backupDestinationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -481,6 +526,12 @@ public Builder copy(AutonomousContainerDatabaseBackupSummary model) { if (model.wasPropertyExplicitlySet("autonomousDatabases")) { this.autonomousDatabases(model.getAutonomousDatabases()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } + if (model.wasPropertyExplicitlySet("backupDestinationDetails")) { + this.backupDestinationDetails(model.getBackupDestinationDetails()); + } return this; } } @@ -910,6 +961,39 @@ public java.util.List getAutonomousDatabases() { return autonomousDatabases; } + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * A valid Oracle AI Database version for Autonomous AI Database. + * When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. + * When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. + * For new databases, it is recommended to use either 19c or 26ai. + *

+ **Note** Starting December 2026, 23ai will not be supported as a valid value for this parameter. + * + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private final BackupDestinationDetails backupDestinationDetails; + + public BackupDestinationDetails getBackupDestinationDetails() { + return backupDestinationDetails; + } + @Override public String toString() { return this.toString(true); @@ -943,6 +1027,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", autonomousDatabases=").append(String.valueOf(this.autonomousDatabases)); + sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", backupDestinationDetails=") + .append(String.valueOf(this.backupDestinationDetails)); sb.append(")"); return sb.toString(); } @@ -977,6 +1064,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.autonomousDatabases, other.autonomousDatabases) + && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals( + this.backupDestinationDetails, other.backupDestinationDetails) && super.equals(other); } @@ -1028,6 +1118,12 @@ public int hashCode() { + (this.autonomousDatabases == null ? 43 : this.autonomousDatabases.hashCode()); + result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationDetails == null + ? 43 + : this.backupDestinationDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } 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 2f6d3d053d..674dbe7d6d 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 @@ -159,6 +159,10 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli "netServicesArchitecture", "availabilityDomain", "clusterPlacementGroupId", + "adScheduledForUpdate", + "timeEarliestAvailableAdUpdate", + "timeLatestAvailableAdUpdate", + "timeScheduledAdUpdate", "cloneTableSpaceList", "cloneType", "additionalAttributes", @@ -301,6 +305,10 @@ public AutonomousDatabase( NetServicesArchitecture netServicesArchitecture, String availabilityDomain, String clusterPlacementGroupId, + String adScheduledForUpdate, + java.util.Date timeEarliestAvailableAdUpdate, + java.util.Date timeLatestAvailableAdUpdate, + java.util.Date timeScheduledAdUpdate, java.util.List cloneTableSpaceList, CloneType cloneType, java.util.Map additionalAttributes, @@ -442,6 +450,10 @@ public AutonomousDatabase( this.netServicesArchitecture = netServicesArchitecture; this.availabilityDomain = availabilityDomain; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.adScheduledForUpdate = adScheduledForUpdate; + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.timeScheduledAdUpdate = timeScheduledAdUpdate; this.cloneTableSpaceList = cloneTableSpaceList; this.cloneType = cloneType; this.additionalAttributes = additionalAttributes; @@ -2926,6 +2938,70 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @param adScheduledForUpdate the value to set + * @return this builder + **/ + public Builder adScheduledForUpdate(String adScheduledForUpdate) { + this.adScheduledForUpdate = adScheduledForUpdate; + this.__explicitlySet__.add("adScheduledForUpdate"); + return this; + } + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeEarliestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeEarliestAvailableAdUpdate(java.util.Date timeEarliestAvailableAdUpdate) { + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.__explicitlySet__.add("timeEarliestAvailableAdUpdate"); + return this; + } + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeLatestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeLatestAvailableAdUpdate(java.util.Date timeLatestAvailableAdUpdate) { + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.__explicitlySet__.add("timeLatestAvailableAdUpdate"); + return this; + } + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @param timeScheduledAdUpdate the value to set + * @return this builder + **/ + public Builder timeScheduledAdUpdate(java.util.Date timeScheduledAdUpdate) { + this.timeScheduledAdUpdate = timeScheduledAdUpdate; + this.__explicitlySet__.add("timeScheduledAdUpdate"); + return this; + } /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -3137,6 +3213,10 @@ public AutonomousDatabase build() { this.netServicesArchitecture, this.availabilityDomain, this.clusterPlacementGroupId, + this.adScheduledForUpdate, + this.timeEarliestAvailableAdUpdate, + this.timeLatestAvailableAdUpdate, + this.timeScheduledAdUpdate, this.cloneTableSpaceList, this.cloneType, this.additionalAttributes, @@ -3565,6 +3645,18 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("adScheduledForUpdate")) { + this.adScheduledForUpdate(model.getAdScheduledForUpdate()); + } + if (model.wasPropertyExplicitlySet("timeEarliestAvailableAdUpdate")) { + this.timeEarliestAvailableAdUpdate(model.getTimeEarliestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeLatestAvailableAdUpdate")) { + this.timeLatestAvailableAdUpdate(model.getTimeLatestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeScheduledAdUpdate")) { + this.timeScheduledAdUpdate(model.getTimeScheduledAdUpdate()); + } if (model.wasPropertyExplicitlySet("cloneTableSpaceList")) { this.cloneTableSpaceList(model.getCloneTableSpaceList()); } @@ -6709,6 +6801,62 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private final String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @return the value + **/ + public String getAdScheduledForUpdate() { + return adScheduledForUpdate; + } + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private final java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeEarliestAvailableAdUpdate() { + return timeEarliestAvailableAdUpdate; + } + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private final java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeLatestAvailableAdUpdate() { + return timeLatestAvailableAdUpdate; + } + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private final java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @return the value + **/ + public java.util.Date getTimeScheduledAdUpdate() { + return timeScheduledAdUpdate; + } + /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -7014,6 +7162,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", adScheduledForUpdate=").append(String.valueOf(this.adScheduledForUpdate)); + sb.append(", timeEarliestAvailableAdUpdate=") + .append(String.valueOf(this.timeEarliestAvailableAdUpdate)); + sb.append(", timeLatestAvailableAdUpdate=") + .append(String.valueOf(this.timeLatestAvailableAdUpdate)); + sb.append(", timeScheduledAdUpdate=").append(String.valueOf(this.timeScheduledAdUpdate)); sb.append(", cloneTableSpaceList=").append(String.valueOf(this.cloneTableSpaceList)); sb.append(", cloneType=").append(String.valueOf(this.cloneType)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); @@ -7228,6 +7382,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.adScheduledForUpdate, other.adScheduledForUpdate) + && java.util.Objects.equals( + this.timeEarliestAvailableAdUpdate, other.timeEarliestAvailableAdUpdate) + && java.util.Objects.equals( + this.timeLatestAvailableAdUpdate, other.timeLatestAvailableAdUpdate) + && java.util.Objects.equals(this.timeScheduledAdUpdate, other.timeScheduledAdUpdate) && java.util.Objects.equals(this.cloneTableSpaceList, other.cloneTableSpaceList) && java.util.Objects.equals(this.cloneType, other.cloneType) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) @@ -7734,6 +7894,26 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.adScheduledForUpdate == null + ? 43 + : this.adScheduledForUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeEarliestAvailableAdUpdate == null + ? 43 + : this.timeEarliestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeLatestAvailableAdUpdate == null + ? 43 + : this.timeLatestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledAdUpdate == null + ? 43 + : this.timeScheduledAdUpdate.hashCode()); result = (result * PRIME) + (this.cloneTableSpaceList == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackup.java index 8947fa5fa8..1a29edb8d7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackup.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackup.java @@ -23,11 +23,13 @@ public final class AutonomousDatabaseInBackup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"compartmentId", "displayName"}) - public AutonomousDatabaseInBackup(String compartmentId, String displayName) { + @java.beans.ConstructorProperties({"compartmentId", "displayName", "lifecycleState"}) + public AutonomousDatabaseInBackup( + String compartmentId, String displayName, LifecycleState lifecycleState) { super(); this.compartmentId = compartmentId; this.displayName = displayName; + this.lifecycleState = lifecycleState; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -64,13 +66,30 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * The current state of the Autonomous AI Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Autonomous AI Database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public AutonomousDatabaseInBackup build() { AutonomousDatabaseInBackup model = - new AutonomousDatabaseInBackup(this.compartmentId, this.displayName); + new AutonomousDatabaseInBackup( + this.compartmentId, this.displayName, this.lifecycleState); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -85,6 +104,9 @@ public Builder copy(AutonomousDatabaseInBackup model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } return this; } } @@ -128,6 +150,88 @@ public String getDisplayName() { return displayName; } + /** + * The current state of the Autonomous AI Database. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + RestoreFailed("RESTORE_FAILED"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + Updating("UPDATING"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Restarting("RESTARTING"), + Recreating("RECREATING"), + RoleChangeInProgress("ROLE_CHANGE_IN_PROGRESS"), + Upgrading("UPGRADING"), + Inaccessible("INACCESSIBLE"), + Standby("STANDBY"), + Transporting("TRANSPORTING"), + + /** + * 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 Autonomous AI Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Autonomous AI Database. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + @Override public String toString() { return this.toString(true); @@ -144,6 +248,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(")"); return sb.toString(); } @@ -160,6 +265,7 @@ public boolean equals(Object o) { AutonomousDatabaseInBackup other = (AutonomousDatabaseInBackup) o; return java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && super.equals(other); } @@ -171,6 +277,9 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupCollection.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupCollection.java new file mode 100644 index 0000000000..98b7e23c49 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.model; + +/** + * The collection of Autonomous Database details that are part of Autonomous Container Database Backup associated. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseInBackupCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousDatabaseInBackupCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AutonomousDatabaseInBackupCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of Autonomous Databases that are part of the Autonomous Container Database Backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of Autonomous Databases that are part of the Autonomous Container Database Backup. + * @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 AutonomousDatabaseInBackupCollection build() { + AutonomousDatabaseInBackupCollection model = + new AutonomousDatabaseInBackupCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseInBackupCollection 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); + } + + /** + * The list of Autonomous Databases that are part of the Autonomous Container Database Backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of Autonomous Databases that are part of the Autonomous Container Database Backup. + * @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("AutonomousDatabaseInBackupCollection("); + 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 AutonomousDatabaseInBackupCollection)) { + return false; + } + + AutonomousDatabaseInBackupCollection other = (AutonomousDatabaseInBackupCollection) 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-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupSummary.java new file mode 100644 index 0000000000..2d2a6185fc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseInBackupSummary.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.model; + +/** + * The summary of the autonomous database that are in the Autonomous Container Database Backup associated. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseInBackupSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousDatabaseInBackupSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "displayName", "lifecycleState"}) + public AutonomousDatabaseInBackupSummary( + String compartmentId, String displayName, LifecycleState lifecycleState) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.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; + } + /** + * The user-friendly name for the Autonomous AI Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Autonomous AI Database. The name does not have to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current state of the Autonomous AI Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Autonomous AI Database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseInBackupSummary build() { + AutonomousDatabaseInBackupSummary model = + new AutonomousDatabaseInBackupSummary( + this.compartmentId, this.displayName, this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseInBackupSummary model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + 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.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Autonomous AI Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Autonomous AI Database. The name does not have to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current state of the Autonomous AI Database. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + RestoreFailed("RESTORE_FAILED"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + Updating("UPDATING"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Restarting("RESTARTING"), + Recreating("RECREATING"), + RoleChangeInProgress("ROLE_CHANGE_IN_PROGRESS"), + Upgrading("UPGRADING"), + Inaccessible("INACCESSIBLE"), + Standby("STANDBY"), + Transporting("TRANSPORTING"), + + /** + * 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 Autonomous AI Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Autonomous AI Database. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + @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("AutonomousDatabaseInBackupSummary("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + 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 AutonomousDatabaseInBackupSummary)) { + return false; + } + + AutonomousDatabaseInBackupSummary other = (AutonomousDatabaseInBackupSummary) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return 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 930b984d7d..f59f2f4629 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 @@ -161,6 +161,10 @@ public final class AutonomousDatabaseSummary "netServicesArchitecture", "availabilityDomain", "clusterPlacementGroupId", + "adScheduledForUpdate", + "timeEarliestAvailableAdUpdate", + "timeLatestAvailableAdUpdate", + "timeScheduledAdUpdate", "cloneTableSpaceList", "cloneType", "additionalAttributes", @@ -302,6 +306,10 @@ public AutonomousDatabaseSummary( NetServicesArchitecture netServicesArchitecture, String availabilityDomain, String clusterPlacementGroupId, + String adScheduledForUpdate, + java.util.Date timeEarliestAvailableAdUpdate, + java.util.Date timeLatestAvailableAdUpdate, + java.util.Date timeScheduledAdUpdate, java.util.List cloneTableSpaceList, CloneType cloneType, java.util.Map additionalAttributes, @@ -442,6 +450,10 @@ public AutonomousDatabaseSummary( this.netServicesArchitecture = netServicesArchitecture; this.availabilityDomain = availabilityDomain; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.adScheduledForUpdate = adScheduledForUpdate; + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.timeScheduledAdUpdate = timeScheduledAdUpdate; this.cloneTableSpaceList = cloneTableSpaceList; this.cloneType = cloneType; this.additionalAttributes = additionalAttributes; @@ -2910,6 +2922,70 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @param adScheduledForUpdate the value to set + * @return this builder + **/ + public Builder adScheduledForUpdate(String adScheduledForUpdate) { + this.adScheduledForUpdate = adScheduledForUpdate; + this.__explicitlySet__.add("adScheduledForUpdate"); + return this; + } + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeEarliestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeEarliestAvailableAdUpdate(java.util.Date timeEarliestAvailableAdUpdate) { + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.__explicitlySet__.add("timeEarliestAvailableAdUpdate"); + return this; + } + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeLatestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeLatestAvailableAdUpdate(java.util.Date timeLatestAvailableAdUpdate) { + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.__explicitlySet__.add("timeLatestAvailableAdUpdate"); + return this; + } + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @param timeScheduledAdUpdate the value to set + * @return this builder + **/ + public Builder timeScheduledAdUpdate(java.util.Date timeScheduledAdUpdate) { + this.timeScheduledAdUpdate = timeScheduledAdUpdate; + this.__explicitlySet__.add("timeScheduledAdUpdate"); + return this; + } /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -3120,6 +3196,10 @@ public AutonomousDatabaseSummary build() { this.netServicesArchitecture, this.availabilityDomain, this.clusterPlacementGroupId, + this.adScheduledForUpdate, + this.timeEarliestAvailableAdUpdate, + this.timeLatestAvailableAdUpdate, + this.timeScheduledAdUpdate, this.cloneTableSpaceList, this.cloneType, this.additionalAttributes, @@ -3545,6 +3625,18 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("adScheduledForUpdate")) { + this.adScheduledForUpdate(model.getAdScheduledForUpdate()); + } + if (model.wasPropertyExplicitlySet("timeEarliestAvailableAdUpdate")) { + this.timeEarliestAvailableAdUpdate(model.getTimeEarliestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeLatestAvailableAdUpdate")) { + this.timeLatestAvailableAdUpdate(model.getTimeLatestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeScheduledAdUpdate")) { + this.timeScheduledAdUpdate(model.getTimeScheduledAdUpdate()); + } if (model.wasPropertyExplicitlySet("cloneTableSpaceList")) { this.cloneTableSpaceList(model.getCloneTableSpaceList()); } @@ -6675,6 +6767,62 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private final String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @return the value + **/ + public String getAdScheduledForUpdate() { + return adScheduledForUpdate; + } + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private final java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeEarliestAvailableAdUpdate() { + return timeEarliestAvailableAdUpdate; + } + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private final java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeLatestAvailableAdUpdate() { + return timeLatestAvailableAdUpdate; + } + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private final java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @return the value + **/ + public java.util.Date getTimeScheduledAdUpdate() { + return timeScheduledAdUpdate; + } + /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -6979,6 +7127,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", adScheduledForUpdate=").append(String.valueOf(this.adScheduledForUpdate)); + sb.append(", timeEarliestAvailableAdUpdate=") + .append(String.valueOf(this.timeEarliestAvailableAdUpdate)); + sb.append(", timeLatestAvailableAdUpdate=") + .append(String.valueOf(this.timeLatestAvailableAdUpdate)); + sb.append(", timeScheduledAdUpdate=").append(String.valueOf(this.timeScheduledAdUpdate)); sb.append(", cloneTableSpaceList=").append(String.valueOf(this.cloneTableSpaceList)); sb.append(", cloneType=").append(String.valueOf(this.cloneType)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); @@ -7192,6 +7346,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.adScheduledForUpdate, other.adScheduledForUpdate) + && java.util.Objects.equals( + this.timeEarliestAvailableAdUpdate, other.timeEarliestAvailableAdUpdate) + && java.util.Objects.equals( + this.timeLatestAvailableAdUpdate, other.timeLatestAvailableAdUpdate) + && java.util.Objects.equals(this.timeScheduledAdUpdate, other.timeScheduledAdUpdate) && java.util.Objects.equals(this.cloneTableSpaceList, other.cloneTableSpaceList) && java.util.Objects.equals(this.cloneType, other.cloneType) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) @@ -7693,6 +7853,26 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.adScheduledForUpdate == null + ? 43 + : this.adScheduledForUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeEarliestAvailableAdUpdate == null + ? 43 + : this.timeEarliestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeLatestAvailableAdUpdate == null + ? 43 + : this.timeLatestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledAdUpdate == null + ? 43 + : this.timeScheduledAdUpdate.hashCode()); result = (result * PRIME) + (this.cloneTableSpaceList == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDwDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDwDatabase.java index 299488b9fe..814ae760b6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDwDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDwDatabase.java @@ -158,6 +158,10 @@ public final class AutonomousDwDatabase extends com.oracle.bmc.http.internal.Exp "netServicesArchitecture", "availabilityDomain", "clusterPlacementGroupId", + "adScheduledForUpdate", + "timeEarliestAvailableAdUpdate", + "timeLatestAvailableAdUpdate", + "timeScheduledAdUpdate", "cloneTableSpaceList", "cloneType", "additionalAttributes", @@ -299,6 +303,10 @@ public AutonomousDwDatabase( NetServicesArchitecture netServicesArchitecture, String availabilityDomain, String clusterPlacementGroupId, + String adScheduledForUpdate, + java.util.Date timeEarliestAvailableAdUpdate, + java.util.Date timeLatestAvailableAdUpdate, + java.util.Date timeScheduledAdUpdate, java.util.List cloneTableSpaceList, CloneType cloneType, java.util.Map additionalAttributes, @@ -439,6 +447,10 @@ public AutonomousDwDatabase( this.netServicesArchitecture = netServicesArchitecture; this.availabilityDomain = availabilityDomain; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.adScheduledForUpdate = adScheduledForUpdate; + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.timeScheduledAdUpdate = timeScheduledAdUpdate; this.cloneTableSpaceList = cloneTableSpaceList; this.cloneType = cloneType; this.additionalAttributes = additionalAttributes; @@ -2907,6 +2919,70 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @param adScheduledForUpdate the value to set + * @return this builder + **/ + public Builder adScheduledForUpdate(String adScheduledForUpdate) { + this.adScheduledForUpdate = adScheduledForUpdate; + this.__explicitlySet__.add("adScheduledForUpdate"); + return this; + } + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeEarliestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeEarliestAvailableAdUpdate(java.util.Date timeEarliestAvailableAdUpdate) { + this.timeEarliestAvailableAdUpdate = timeEarliestAvailableAdUpdate; + this.__explicitlySet__.add("timeEarliestAvailableAdUpdate"); + return this; + } + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @param timeLatestAvailableAdUpdate the value to set + * @return this builder + **/ + public Builder timeLatestAvailableAdUpdate(java.util.Date timeLatestAvailableAdUpdate) { + this.timeLatestAvailableAdUpdate = timeLatestAvailableAdUpdate; + this.__explicitlySet__.add("timeLatestAvailableAdUpdate"); + return this; + } + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @param timeScheduledAdUpdate the value to set + * @return this builder + **/ + public Builder timeScheduledAdUpdate(java.util.Date timeScheduledAdUpdate) { + this.timeScheduledAdUpdate = timeScheduledAdUpdate; + this.__explicitlySet__.add("timeScheduledAdUpdate"); + return this; + } /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -3117,6 +3193,10 @@ public AutonomousDwDatabase build() { this.netServicesArchitecture, this.availabilityDomain, this.clusterPlacementGroupId, + this.adScheduledForUpdate, + this.timeEarliestAvailableAdUpdate, + this.timeLatestAvailableAdUpdate, + this.timeScheduledAdUpdate, this.cloneTableSpaceList, this.cloneType, this.additionalAttributes, @@ -3542,6 +3622,18 @@ public Builder copy(AutonomousDwDatabase model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("adScheduledForUpdate")) { + this.adScheduledForUpdate(model.getAdScheduledForUpdate()); + } + if (model.wasPropertyExplicitlySet("timeEarliestAvailableAdUpdate")) { + this.timeEarliestAvailableAdUpdate(model.getTimeEarliestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeLatestAvailableAdUpdate")) { + this.timeLatestAvailableAdUpdate(model.getTimeLatestAvailableAdUpdate()); + } + if (model.wasPropertyExplicitlySet("timeScheduledAdUpdate")) { + this.timeScheduledAdUpdate(model.getTimeScheduledAdUpdate()); + } if (model.wasPropertyExplicitlySet("cloneTableSpaceList")) { this.cloneTableSpaceList(model.getCloneTableSpaceList()); } @@ -6440,6 +6532,62 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The Availability Domain which is planned for Scheduled Update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adScheduledForUpdate") + private final String adScheduledForUpdate; + + /** + * The Availability Domain which is planned for Scheduled Update + * @return the value + **/ + public String getAdScheduledForUpdate() { + return adScheduledForUpdate; + } + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEarliestAvailableAdUpdate") + private final java.util.Date timeEarliestAvailableAdUpdate; + + /** + * The earliest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeEarliestAvailableAdUpdate() { + return timeEarliestAvailableAdUpdate; + } + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLatestAvailableAdUpdate") + private final java.util.Date timeLatestAvailableAdUpdate; + + /** + * The latest date and time to which you can schedule an Autonomous Database availability domain update. + * @return the value + **/ + public java.util.Date getTimeLatestAvailableAdUpdate() { + return timeLatestAvailableAdUpdate; + } + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private final java.util.Date timeScheduledAdUpdate; + + /** + * The date and time to which the Autonomous Database availability domain update is scheduled. + * @return the value + **/ + public java.util.Date getTimeScheduledAdUpdate() { + return timeScheduledAdUpdate; + } + /** * A list of the source Autonomous AI Database's table space number(s) used to create this partial clone from the backup. **/ @@ -6731,6 +6879,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", adScheduledForUpdate=").append(String.valueOf(this.adScheduledForUpdate)); + sb.append(", timeEarliestAvailableAdUpdate=") + .append(String.valueOf(this.timeEarliestAvailableAdUpdate)); + sb.append(", timeLatestAvailableAdUpdate=") + .append(String.valueOf(this.timeLatestAvailableAdUpdate)); + sb.append(", timeScheduledAdUpdate=").append(String.valueOf(this.timeScheduledAdUpdate)); sb.append(", cloneTableSpaceList=").append(String.valueOf(this.cloneTableSpaceList)); sb.append(", cloneType=").append(String.valueOf(this.cloneType)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); @@ -6944,6 +7098,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.adScheduledForUpdate, other.adScheduledForUpdate) + && java.util.Objects.equals( + this.timeEarliestAvailableAdUpdate, other.timeEarliestAvailableAdUpdate) + && java.util.Objects.equals( + this.timeLatestAvailableAdUpdate, other.timeLatestAvailableAdUpdate) + && java.util.Objects.equals(this.timeScheduledAdUpdate, other.timeScheduledAdUpdate) && java.util.Objects.equals(this.cloneTableSpaceList, other.cloneTableSpaceList) && java.util.Objects.equals(this.cloneType, other.cloneType) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) @@ -7445,6 +7605,26 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.adScheduledForUpdate == null + ? 43 + : this.adScheduledForUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeEarliestAvailableAdUpdate == null + ? 43 + : this.timeEarliestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeLatestAvailableAdUpdate == null + ? 43 + : this.timeLatestAvailableAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledAdUpdate == null + ? 43 + : this.timeScheduledAdUpdate.hashCode()); result = (result * PRIME) + (this.cloneTableSpaceList == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseBase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseBase.java index 0033f8fd4f..b755c2bdaf 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseBase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseBase.java @@ -23,6 +23,10 @@ defaultImpl = CreateAutonomousContainerDatabaseBase.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateAutonomousContainerDatabaseFromBackupTimestampDetails.class, + name = "BACKUP_FROM_TIMESTAMP" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateAutonomousContainerDatabaseDetails.class, name = "NONE" @@ -1243,6 +1247,7 @@ public int hashCode() { public enum Source { None("NONE"), BackupFromId("BACKUP_FROM_ID"), + BackupFromTimestamp("BACKUP_FROM_TIMESTAMP"), ; private final String value; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupDetails.java index bf64ebc05e..50ad3d9fcf 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupDetails.java @@ -411,6 +411,57 @@ public Builder autonomousContainerDatabaseBackupId( this.__explicitlySet__.add("autonomousContainerDatabaseBackupId"); return this; } + /** + * The Autonomous AI Database clone type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneType") + private CloneType cloneType; + + /** + * The Autonomous AI Database clone type. + * @param cloneType the value to set + * @return this builder + **/ + public Builder cloneType(CloneType cloneType) { + this.cloneType = cloneType; + this.__explicitlySet__.add("cloneType"); + return this; + } + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabasesToClone") + private java.util.List autonomousDatabasesToClone; + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + * @param autonomousDatabasesToClone the value to set + * @return this builder + **/ + public Builder autonomousDatabasesToClone( + java.util.List autonomousDatabasesToClone) { + this.autonomousDatabasesToClone = autonomousDatabasesToClone; + this.__explicitlySet__.add("autonomousDatabasesToClone"); + return this; + } + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneBandWidth") + private CloneBandWidth cloneBandWidth; + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + * @param cloneBandWidth the value to set + * @return this builder + **/ + public Builder cloneBandWidth(CloneBandWidth cloneBandWidth) { + this.cloneBandWidth = cloneBandWidth; + this.__explicitlySet__.add("cloneBandWidth"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -457,7 +508,10 @@ public CreateAutonomousContainerDatabaseFromBackupDetails build() { this.vmFailoverReservation, this.distributionAffinity, this.netServicesArchitecture, - this.autonomousContainerDatabaseBackupId); + this.autonomousContainerDatabaseBackupId, + this.cloneType, + this.autonomousDatabasesToClone, + this.cloneBandWidth); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -593,6 +647,15 @@ public Builder copy(CreateAutonomousContainerDatabaseFromBackupDetails model) { this.autonomousContainerDatabaseBackupId( model.getAutonomousContainerDatabaseBackupId()); } + if (model.wasPropertyExplicitlySet("cloneType")) { + this.cloneType(model.getCloneType()); + } + if (model.wasPropertyExplicitlySet("autonomousDatabasesToClone")) { + this.autonomousDatabasesToClone(model.getAutonomousDatabasesToClone()); + } + if (model.wasPropertyExplicitlySet("cloneBandWidth")) { + this.cloneBandWidth(model.getCloneBandWidth()); + } return this; } } @@ -649,7 +712,10 @@ public CreateAutonomousContainerDatabaseFromBackupDetails( Integer vmFailoverReservation, DistributionAffinity distributionAffinity, NetServicesArchitecture netServicesArchitecture, - String autonomousContainerDatabaseBackupId) { + String autonomousContainerDatabaseBackupId, + CloneType cloneType, + java.util.List autonomousDatabasesToClone, + CloneBandWidth cloneBandWidth) { super( customerContacts, okvEndPointGroupName, @@ -691,6 +757,9 @@ public CreateAutonomousContainerDatabaseFromBackupDetails( distributionAffinity, netServicesArchitecture); this.autonomousContainerDatabaseBackupId = autonomousContainerDatabaseBackupId; + this.cloneType = cloneType; + this.autonomousDatabasesToClone = autonomousDatabasesToClone; + this.cloneBandWidth = cloneBandWidth; } /** @@ -707,6 +776,122 @@ public String getAutonomousContainerDatabaseBackupId() { return autonomousContainerDatabaseBackupId; } + /** + * The Autonomous AI Database clone type. + **/ + public enum CloneType { + Full("FULL"), + Metadata("METADATA"), + Partial("PARTIAL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneType v : CloneType.values()) { + map.put(v.getValue(), v); + } + } + + CloneType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid CloneType: " + key); + } + }; + /** + * The Autonomous AI Database clone type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneType") + private final CloneType cloneType; + + /** + * The Autonomous AI Database clone type. + * @return the value + **/ + public CloneType getCloneType() { + return cloneType; + } + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabasesToClone") + private final java.util.List autonomousDatabasesToClone; + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + * @return the value + **/ + public java.util.List getAutonomousDatabasesToClone() { + return autonomousDatabasesToClone; + } + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + public enum CloneBandWidth { + Slow("SLOW"), + Medium("MEDIUM"), + Fast("FAST"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneBandWidth v : CloneBandWidth.values()) { + map.put(v.getValue(), v); + } + } + + CloneBandWidth(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneBandWidth create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid CloneBandWidth: " + key); + } + }; + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneBandWidth") + private final CloneBandWidth cloneBandWidth; + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + * @return the value + **/ + public CloneBandWidth getCloneBandWidth() { + return cloneBandWidth; + } + @Override public String toString() { return this.toString(true); @@ -723,6 +908,10 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", autonomousContainerDatabaseBackupId=") .append(String.valueOf(this.autonomousContainerDatabaseBackupId)); + sb.append(", cloneType=").append(String.valueOf(this.cloneType)); + sb.append(", autonomousDatabasesToClone=") + .append(String.valueOf(this.autonomousDatabasesToClone)); + sb.append(", cloneBandWidth=").append(String.valueOf(this.cloneBandWidth)); sb.append(")"); return sb.toString(); } @@ -741,6 +930,10 @@ public boolean equals(Object o) { return java.util.Objects.equals( this.autonomousContainerDatabaseBackupId, other.autonomousContainerDatabaseBackupId) + && java.util.Objects.equals(this.cloneType, other.cloneType) + && java.util.Objects.equals( + this.autonomousDatabasesToClone, other.autonomousDatabasesToClone) + && java.util.Objects.equals(this.cloneBandWidth, other.cloneBandWidth) && super.equals(other); } @@ -753,6 +946,15 @@ public int hashCode() { + (this.autonomousContainerDatabaseBackupId == null ? 43 : this.autonomousContainerDatabaseBackupId.hashCode()); + result = (result * PRIME) + (this.cloneType == null ? 43 : this.cloneType.hashCode()); + result = + (result * PRIME) + + (this.autonomousDatabasesToClone == null + ? 43 + : this.autonomousDatabasesToClone.hashCode()); + result = + (result * PRIME) + + (this.cloneBandWidth == null ? 43 : this.cloneBandWidth.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupTimestampDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupTimestampDetails.java new file mode 100644 index 0000000000..449cf1c4d1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousContainerDatabaseFromBackupTimestampDetails.java @@ -0,0 +1,1061 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.model; + +/** + * Details to create an Autonomous Container Database (ACD) by cloning backup available, of an existing ACD, at the requested time stamp. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousContainerDatabaseFromBackupTimestampDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousContainerDatabaseFromBackupTimestampDetails + extends CreateAutonomousContainerDatabaseBase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private java.util.List customerContacts; + + public Builder customerContacts(java.util.List customerContacts) { + this.customerContacts = customerContacts; + this.__explicitlySet__.add("customerContacts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private String okvEndPointGroupName; + + public Builder okvEndPointGroupName(String okvEndPointGroupName) { + this.okvEndPointGroupName = okvEndPointGroupName; + this.__explicitlySet__.add("okvEndPointGroupName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbUniqueName") + private String dbUniqueName; + + public Builder dbUniqueName(String dbUniqueName) { + this.dbUniqueName = dbUniqueName; + this.__explicitlySet__.add("dbUniqueName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("serviceLevelAgreementType") + private ServiceLevelAgreementType serviceLevelAgreementType; + + public Builder serviceLevelAgreementType( + ServiceLevelAgreementType serviceLevelAgreementType) { + this.serviceLevelAgreementType = serviceLevelAgreementType; + this.__explicitlySet__.add("serviceLevelAgreementType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autonomousExadataInfrastructureId") + private String autonomousExadataInfrastructureId; + + public Builder autonomousExadataInfrastructureId(String autonomousExadataInfrastructureId) { + this.autonomousExadataInfrastructureId = autonomousExadataInfrastructureId; + this.__explicitlySet__.add("autonomousExadataInfrastructureId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private String databaseSoftwareImageId; + + public Builder databaseSoftwareImageId(String databaseSoftwareImageId) { + this.databaseSoftwareImageId = databaseSoftwareImageId; + this.__explicitlySet__.add("databaseSoftwareImageId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousExadataInfrastructureId") + private String peerAutonomousExadataInfrastructureId; + + public Builder peerAutonomousExadataInfrastructureId( + String peerAutonomousExadataInfrastructureId) { + this.peerAutonomousExadataInfrastructureId = peerAutonomousExadataInfrastructureId; + this.__explicitlySet__.add("peerAutonomousExadataInfrastructureId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousContainerDatabaseDisplayName") + private String peerAutonomousContainerDatabaseDisplayName; + + public Builder peerAutonomousContainerDatabaseDisplayName( + String peerAutonomousContainerDatabaseDisplayName) { + this.peerAutonomousContainerDatabaseDisplayName = + peerAutonomousContainerDatabaseDisplayName; + this.__explicitlySet__.add("peerAutonomousContainerDatabaseDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + public Builder fastStartFailOverLagLimitInSeconds( + Integer fastStartFailOverLagLimitInSeconds) { + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.__explicitlySet__.add("fastStartFailOverLagLimitInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private Boolean isAutomaticFailoverEnabled; + + public Builder isAutomaticFailoverEnabled(Boolean isAutomaticFailoverEnabled) { + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.__explicitlySet__.add("isAutomaticFailoverEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerCloudAutonomousVmClusterId") + private String peerCloudAutonomousVmClusterId; + + public Builder peerCloudAutonomousVmClusterId(String peerCloudAutonomousVmClusterId) { + this.peerCloudAutonomousVmClusterId = peerCloudAutonomousVmClusterId; + this.__explicitlySet__.add("peerCloudAutonomousVmClusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousVmClusterId") + private String peerAutonomousVmClusterId; + + public Builder peerAutonomousVmClusterId(String peerAutonomousVmClusterId) { + this.peerAutonomousVmClusterId = peerAutonomousVmClusterId; + this.__explicitlySet__.add("peerAutonomousVmClusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty( + "peerAutonomousContainerDatabaseCompartmentId") + private String peerAutonomousContainerDatabaseCompartmentId; + + public Builder peerAutonomousContainerDatabaseCompartmentId( + String peerAutonomousContainerDatabaseCompartmentId) { + this.peerAutonomousContainerDatabaseCompartmentId = + peerAutonomousContainerDatabaseCompartmentId; + this.__explicitlySet__.add("peerAutonomousContainerDatabaseCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty( + "peerAutonomousContainerDatabaseBackupConfig") + private PeerAutonomousContainerDatabaseBackupConfig + peerAutonomousContainerDatabaseBackupConfig; + + public Builder peerAutonomousContainerDatabaseBackupConfig( + PeerAutonomousContainerDatabaseBackupConfig + peerAutonomousContainerDatabaseBackupConfig) { + this.peerAutonomousContainerDatabaseBackupConfig = + peerAutonomousContainerDatabaseBackupConfig; + this.__explicitlySet__.add("peerAutonomousContainerDatabaseBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerDbUniqueName") + private String peerDbUniqueName; + + public Builder peerDbUniqueName(String peerDbUniqueName) { + this.peerDbUniqueName = peerDbUniqueName; + this.__explicitlySet__.add("peerDbUniqueName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autonomousVmClusterId") + private String autonomousVmClusterId; + + public Builder autonomousVmClusterId(String autonomousVmClusterId) { + this.autonomousVmClusterId = autonomousVmClusterId; + this.__explicitlySet__.add("autonomousVmClusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private String cloudAutonomousVmClusterId; + + public Builder cloudAutonomousVmClusterId(String cloudAutonomousVmClusterId) { + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.__explicitlySet__.add("cloudAutonomousVmClusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchModel") + private PatchModel patchModel; + + public Builder patchModel(PatchModel patchModel) { + this.patchModel = patchModel; + this.__explicitlySet__.add("patchModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowDetails") + private MaintenanceWindow maintenanceWindowDetails; + + public Builder maintenanceWindowDetails(MaintenanceWindow maintenanceWindowDetails) { + this.maintenanceWindowDetails = maintenanceWindowDetails; + this.__explicitlySet__.add("maintenanceWindowDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private Integer standbyMaintenanceBufferInDays; + + public Builder standbyMaintenanceBufferInDays(Integer standbyMaintenanceBufferInDays) { + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.__explicitlySet__.add("standbyMaintenanceBufferInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("versionPreference") + private VersionPreference versionPreference; + + public Builder versionPreference(VersionPreference versionPreference) { + this.versionPreference = versionPreference; + this.__explicitlySet__.add("versionPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isDstFileUpdateEnabled") + private Boolean isDstFileUpdateEnabled; + + public Builder isDstFileUpdateEnabled(Boolean isDstFileUpdateEnabled) { + this.isDstFileUpdateEnabled = isDstFileUpdateEnabled; + this.__explicitlySet__.add("isDstFileUpdateEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupConfig") + private AutonomousContainerDatabaseBackupConfig backupConfig; + + public Builder backupConfig(AutonomousContainerDatabaseBackupConfig backupConfig) { + this.backupConfig = backupConfig; + this.__explicitlySet__.add("backupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreId") + private String keyStoreId; + + public Builder keyStoreId(String keyStoreId) { + this.keyStoreId = keyStoreId; + this.__explicitlySet__.add("keyStoreId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyLocationDetails") + private EncryptionKeyLocationDetails encryptionKeyLocationDetails; + + public Builder encryptionKeyLocationDetails( + EncryptionKeyLocationDetails encryptionKeyLocationDetails) { + this.encryptionKeyLocationDetails = encryptionKeyLocationDetails; + this.__explicitlySet__.add("encryptionKeyLocationDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbSplitThreshold") + private Integer dbSplitThreshold; + + public Builder dbSplitThreshold(Integer dbSplitThreshold) { + this.dbSplitThreshold = dbSplitThreshold; + this.__explicitlySet__.add("dbSplitThreshold"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFailoverReservation") + private Integer vmFailoverReservation; + + public Builder vmFailoverReservation(Integer vmFailoverReservation) { + this.vmFailoverReservation = vmFailoverReservation; + this.__explicitlySet__.add("vmFailoverReservation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("distributionAffinity") + private DistributionAffinity distributionAffinity; + + public Builder distributionAffinity(DistributionAffinity distributionAffinity) { + this.distributionAffinity = distributionAffinity; + this.__explicitlySet__.add("distributionAffinity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("netServicesArchitecture") + private NetServicesArchitecture netServicesArchitecture; + + public Builder netServicesArchitecture(NetServicesArchitecture netServicesArchitecture) { + this.netServicesArchitecture = netServicesArchitecture; + this.__explicitlySet__.add("netServicesArchitecture"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source ACD that you will clone to create a new ACD. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceAutonomousContainerDatabaseId") + private String sourceAutonomousContainerDatabaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source ACD that you will clone to create a new ACD. + * @param sourceAutonomousContainerDatabaseId the value to set + * @return this builder + **/ + public Builder sourceAutonomousContainerDatabaseId( + String sourceAutonomousContainerDatabaseId) { + this.sourceAutonomousContainerDatabaseId = sourceAutonomousContainerDatabaseId; + this.__explicitlySet__.add("sourceAutonomousContainerDatabaseId"); + return this; + } + /** + * The time stamp representing the point in time to which the Autonomous Container Database should be cloned from backup. And the requested timeStamp should be in the past. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStampToUseForCloning") + private java.util.Date timeStampToUseForCloning; + + /** + * The time stamp representing the point in time to which the Autonomous Container Database should be cloned from backup. And the requested timeStamp should be in the past. + * + * @param timeStampToUseForCloning the value to set + * @return this builder + **/ + public Builder timeStampToUseForCloning(java.util.Date timeStampToUseForCloning) { + this.timeStampToUseForCloning = timeStampToUseForCloning; + this.__explicitlySet__.add("timeStampToUseForCloning"); + return this; + } + /** + * If set to true, OCI shall attempt to create a point in time to the latest available backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldUseLatestAvailableBackupTimeStamp") + private Boolean shouldUseLatestAvailableBackupTimeStamp; + + /** + * If set to true, OCI shall attempt to create a point in time to the latest available backup of the source Autonomous Container Database. + * + * @param shouldUseLatestAvailableBackupTimeStamp the value to set + * @return this builder + **/ + public Builder shouldUseLatestAvailableBackupTimeStamp( + Boolean shouldUseLatestAvailableBackupTimeStamp) { + this.shouldUseLatestAvailableBackupTimeStamp = shouldUseLatestAvailableBackupTimeStamp; + this.__explicitlySet__.add("shouldUseLatestAvailableBackupTimeStamp"); + return this; + } + /** + * The Autonomous AI Database clone type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneType") + private CloneType cloneType; + + /** + * The Autonomous AI Database clone type. + * @param cloneType the value to set + * @return this builder + **/ + public Builder cloneType(CloneType cloneType) { + this.cloneType = cloneType; + this.__explicitlySet__.add("cloneType"); + return this; + } + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabasesToClone") + private java.util.List autonomousDatabasesToClone; + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + * @param autonomousDatabasesToClone the value to set + * @return this builder + **/ + public Builder autonomousDatabasesToClone( + java.util.List autonomousDatabasesToClone) { + this.autonomousDatabasesToClone = autonomousDatabasesToClone; + this.__explicitlySet__.add("autonomousDatabasesToClone"); + return this; + } + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneBandWidth") + private CloneBandWidth cloneBandWidth; + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + * @param cloneBandWidth the value to set + * @return this builder + **/ + public Builder cloneBandWidth(CloneBandWidth cloneBandWidth) { + this.cloneBandWidth = cloneBandWidth; + this.__explicitlySet__.add("cloneBandWidth"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousContainerDatabaseFromBackupTimestampDetails build() { + CreateAutonomousContainerDatabaseFromBackupTimestampDetails model = + new CreateAutonomousContainerDatabaseFromBackupTimestampDetails( + this.customerContacts, + this.okvEndPointGroupName, + this.displayName, + this.dbUniqueName, + this.dbName, + this.serviceLevelAgreementType, + this.autonomousExadataInfrastructureId, + this.dbVersion, + this.databaseSoftwareImageId, + this.peerAutonomousExadataInfrastructureId, + this.peerAutonomousContainerDatabaseDisplayName, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.isAutomaticFailoverEnabled, + this.peerCloudAutonomousVmClusterId, + this.peerAutonomousVmClusterId, + this.peerAutonomousContainerDatabaseCompartmentId, + this.peerAutonomousContainerDatabaseBackupConfig, + this.peerDbUniqueName, + this.autonomousVmClusterId, + this.cloudAutonomousVmClusterId, + this.compartmentId, + this.patchModel, + this.maintenanceWindowDetails, + this.standbyMaintenanceBufferInDays, + this.versionPreference, + this.isDstFileUpdateEnabled, + this.freeformTags, + this.definedTags, + this.backupConfig, + this.kmsKeyId, + this.kmsKeyVersionId, + this.vaultId, + this.keyStoreId, + this.encryptionKeyLocationDetails, + this.dbSplitThreshold, + this.vmFailoverReservation, + this.distributionAffinity, + this.netServicesArchitecture, + this.sourceAutonomousContainerDatabaseId, + this.timeStampToUseForCloning, + this.shouldUseLatestAvailableBackupTimeStamp, + this.cloneType, + this.autonomousDatabasesToClone, + this.cloneBandWidth); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousContainerDatabaseFromBackupTimestampDetails model) { + if (model.wasPropertyExplicitlySet("customerContacts")) { + this.customerContacts(model.getCustomerContacts()); + } + if (model.wasPropertyExplicitlySet("okvEndPointGroupName")) { + this.okvEndPointGroupName(model.getOkvEndPointGroupName()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("dbUniqueName")) { + this.dbUniqueName(model.getDbUniqueName()); + } + if (model.wasPropertyExplicitlySet("dbName")) { + this.dbName(model.getDbName()); + } + if (model.wasPropertyExplicitlySet("serviceLevelAgreementType")) { + this.serviceLevelAgreementType(model.getServiceLevelAgreementType()); + } + if (model.wasPropertyExplicitlySet("autonomousExadataInfrastructureId")) { + this.autonomousExadataInfrastructureId( + model.getAutonomousExadataInfrastructureId()); + } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } + if (model.wasPropertyExplicitlySet("databaseSoftwareImageId")) { + this.databaseSoftwareImageId(model.getDatabaseSoftwareImageId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousExadataInfrastructureId")) { + this.peerAutonomousExadataInfrastructureId( + model.getPeerAutonomousExadataInfrastructureId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseDisplayName")) { + this.peerAutonomousContainerDatabaseDisplayName( + model.getPeerAutonomousContainerDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("isAutomaticFailoverEnabled")) { + this.isAutomaticFailoverEnabled(model.getIsAutomaticFailoverEnabled()); + } + if (model.wasPropertyExplicitlySet("peerCloudAutonomousVmClusterId")) { + this.peerCloudAutonomousVmClusterId(model.getPeerCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousVmClusterId")) { + this.peerAutonomousVmClusterId(model.getPeerAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseCompartmentId")) { + this.peerAutonomousContainerDatabaseCompartmentId( + model.getPeerAutonomousContainerDatabaseCompartmentId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseBackupConfig")) { + this.peerAutonomousContainerDatabaseBackupConfig( + model.getPeerAutonomousContainerDatabaseBackupConfig()); + } + if (model.wasPropertyExplicitlySet("peerDbUniqueName")) { + this.peerDbUniqueName(model.getPeerDbUniqueName()); + } + if (model.wasPropertyExplicitlySet("autonomousVmClusterId")) { + this.autonomousVmClusterId(model.getAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("cloudAutonomousVmClusterId")) { + this.cloudAutonomousVmClusterId(model.getCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("patchModel")) { + this.patchModel(model.getPatchModel()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowDetails")) { + this.maintenanceWindowDetails(model.getMaintenanceWindowDetails()); + } + if (model.wasPropertyExplicitlySet("standbyMaintenanceBufferInDays")) { + this.standbyMaintenanceBufferInDays(model.getStandbyMaintenanceBufferInDays()); + } + if (model.wasPropertyExplicitlySet("versionPreference")) { + this.versionPreference(model.getVersionPreference()); + } + if (model.wasPropertyExplicitlySet("isDstFileUpdateEnabled")) { + this.isDstFileUpdateEnabled(model.getIsDstFileUpdateEnabled()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("backupConfig")) { + this.backupConfig(model.getBackupConfig()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("keyStoreId")) { + this.keyStoreId(model.getKeyStoreId()); + } + if (model.wasPropertyExplicitlySet("encryptionKeyLocationDetails")) { + this.encryptionKeyLocationDetails(model.getEncryptionKeyLocationDetails()); + } + if (model.wasPropertyExplicitlySet("dbSplitThreshold")) { + this.dbSplitThreshold(model.getDbSplitThreshold()); + } + if (model.wasPropertyExplicitlySet("vmFailoverReservation")) { + this.vmFailoverReservation(model.getVmFailoverReservation()); + } + if (model.wasPropertyExplicitlySet("distributionAffinity")) { + this.distributionAffinity(model.getDistributionAffinity()); + } + if (model.wasPropertyExplicitlySet("netServicesArchitecture")) { + this.netServicesArchitecture(model.getNetServicesArchitecture()); + } + if (model.wasPropertyExplicitlySet("sourceAutonomousContainerDatabaseId")) { + this.sourceAutonomousContainerDatabaseId( + model.getSourceAutonomousContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("timeStampToUseForCloning")) { + this.timeStampToUseForCloning(model.getTimeStampToUseForCloning()); + } + if (model.wasPropertyExplicitlySet("shouldUseLatestAvailableBackupTimeStamp")) { + this.shouldUseLatestAvailableBackupTimeStamp( + model.getShouldUseLatestAvailableBackupTimeStamp()); + } + if (model.wasPropertyExplicitlySet("cloneType")) { + this.cloneType(model.getCloneType()); + } + if (model.wasPropertyExplicitlySet("autonomousDatabasesToClone")) { + this.autonomousDatabasesToClone(model.getAutonomousDatabasesToClone()); + } + if (model.wasPropertyExplicitlySet("cloneBandWidth")) { + this.cloneBandWidth(model.getCloneBandWidth()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateAutonomousContainerDatabaseFromBackupTimestampDetails( + java.util.List customerContacts, + String okvEndPointGroupName, + String displayName, + String dbUniqueName, + String dbName, + ServiceLevelAgreementType serviceLevelAgreementType, + String autonomousExadataInfrastructureId, + String dbVersion, + String databaseSoftwareImageId, + String peerAutonomousExadataInfrastructureId, + String peerAutonomousContainerDatabaseDisplayName, + ProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Boolean isAutomaticFailoverEnabled, + String peerCloudAutonomousVmClusterId, + String peerAutonomousVmClusterId, + String peerAutonomousContainerDatabaseCompartmentId, + PeerAutonomousContainerDatabaseBackupConfig peerAutonomousContainerDatabaseBackupConfig, + String peerDbUniqueName, + String autonomousVmClusterId, + String cloudAutonomousVmClusterId, + String compartmentId, + PatchModel patchModel, + MaintenanceWindow maintenanceWindowDetails, + Integer standbyMaintenanceBufferInDays, + VersionPreference versionPreference, + Boolean isDstFileUpdateEnabled, + java.util.Map freeformTags, + java.util.Map> definedTags, + AutonomousContainerDatabaseBackupConfig backupConfig, + String kmsKeyId, + String kmsKeyVersionId, + String vaultId, + String keyStoreId, + EncryptionKeyLocationDetails encryptionKeyLocationDetails, + Integer dbSplitThreshold, + Integer vmFailoverReservation, + DistributionAffinity distributionAffinity, + NetServicesArchitecture netServicesArchitecture, + String sourceAutonomousContainerDatabaseId, + java.util.Date timeStampToUseForCloning, + Boolean shouldUseLatestAvailableBackupTimeStamp, + CloneType cloneType, + java.util.List autonomousDatabasesToClone, + CloneBandWidth cloneBandWidth) { + super( + customerContacts, + okvEndPointGroupName, + displayName, + dbUniqueName, + dbName, + serviceLevelAgreementType, + autonomousExadataInfrastructureId, + dbVersion, + databaseSoftwareImageId, + peerAutonomousExadataInfrastructureId, + peerAutonomousContainerDatabaseDisplayName, + protectionMode, + fastStartFailOverLagLimitInSeconds, + isAutomaticFailoverEnabled, + peerCloudAutonomousVmClusterId, + peerAutonomousVmClusterId, + peerAutonomousContainerDatabaseCompartmentId, + peerAutonomousContainerDatabaseBackupConfig, + peerDbUniqueName, + autonomousVmClusterId, + cloudAutonomousVmClusterId, + compartmentId, + patchModel, + maintenanceWindowDetails, + standbyMaintenanceBufferInDays, + versionPreference, + isDstFileUpdateEnabled, + freeformTags, + definedTags, + backupConfig, + kmsKeyId, + kmsKeyVersionId, + vaultId, + keyStoreId, + encryptionKeyLocationDetails, + dbSplitThreshold, + vmFailoverReservation, + distributionAffinity, + netServicesArchitecture); + this.sourceAutonomousContainerDatabaseId = sourceAutonomousContainerDatabaseId; + this.timeStampToUseForCloning = timeStampToUseForCloning; + this.shouldUseLatestAvailableBackupTimeStamp = shouldUseLatestAvailableBackupTimeStamp; + this.cloneType = cloneType; + this.autonomousDatabasesToClone = autonomousDatabasesToClone; + this.cloneBandWidth = cloneBandWidth; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source ACD that you will clone to create a new ACD. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceAutonomousContainerDatabaseId") + private final String sourceAutonomousContainerDatabaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source ACD that you will clone to create a new ACD. + * @return the value + **/ + public String getSourceAutonomousContainerDatabaseId() { + return sourceAutonomousContainerDatabaseId; + } + + /** + * The time stamp representing the point in time to which the Autonomous Container Database should be cloned from backup. And the requested timeStamp should be in the past. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStampToUseForCloning") + private final java.util.Date timeStampToUseForCloning; + + /** + * The time stamp representing the point in time to which the Autonomous Container Database should be cloned from backup. And the requested timeStamp should be in the past. + * + * @return the value + **/ + public java.util.Date getTimeStampToUseForCloning() { + return timeStampToUseForCloning; + } + + /** + * If set to true, OCI shall attempt to create a point in time to the latest available backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldUseLatestAvailableBackupTimeStamp") + private final Boolean shouldUseLatestAvailableBackupTimeStamp; + + /** + * If set to true, OCI shall attempt to create a point in time to the latest available backup of the source Autonomous Container Database. + * + * @return the value + **/ + public Boolean getShouldUseLatestAvailableBackupTimeStamp() { + return shouldUseLatestAvailableBackupTimeStamp; + } + + /** + * The Autonomous AI Database clone type. + **/ + public enum CloneType { + Full("FULL"), + Metadata("METADATA"), + Partial("PARTIAL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneType v : CloneType.values()) { + map.put(v.getValue(), v); + } + } + + CloneType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid CloneType: " + key); + } + }; + /** + * The Autonomous AI Database clone type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneType") + private final CloneType cloneType; + + /** + * The Autonomous AI Database clone type. + * @return the value + **/ + public CloneType getCloneType() { + return cloneType; + } + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabasesToClone") + private final java.util.List autonomousDatabasesToClone; + + /** + * A list of Autonomous Databases ( display name of the ADB in specific ) to be cloned from backup of the source Autonomous Container Database. + * + * @return the value + **/ + public java.util.List getAutonomousDatabasesToClone() { + return autonomousDatabasesToClone; + } + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + public enum CloneBandWidth { + Slow("SLOW"), + Medium("MEDIUM"), + Fast("FAST"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneBandWidth v : CloneBandWidth.values()) { + map.put(v.getValue(), v); + } + } + + CloneBandWidth(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneBandWidth create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid CloneBandWidth: " + key); + } + }; + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneBandWidth") + private final CloneBandWidth cloneBandWidth; + + /** + * The speed at which the Autonomous Container Database Clone from backup operation to be performed by OCI. + * @return the value + **/ + public CloneBandWidth getCloneBandWidth() { + return cloneBandWidth; + } + + @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("CreateAutonomousContainerDatabaseFromBackupTimestampDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", sourceAutonomousContainerDatabaseId=") + .append(String.valueOf(this.sourceAutonomousContainerDatabaseId)); + sb.append(", timeStampToUseForCloning=") + .append(String.valueOf(this.timeStampToUseForCloning)); + sb.append(", shouldUseLatestAvailableBackupTimeStamp=") + .append(String.valueOf(this.shouldUseLatestAvailableBackupTimeStamp)); + sb.append(", cloneType=").append(String.valueOf(this.cloneType)); + sb.append(", autonomousDatabasesToClone=") + .append(String.valueOf(this.autonomousDatabasesToClone)); + sb.append(", cloneBandWidth=").append(String.valueOf(this.cloneBandWidth)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousContainerDatabaseFromBackupTimestampDetails)) { + return false; + } + + CreateAutonomousContainerDatabaseFromBackupTimestampDetails other = + (CreateAutonomousContainerDatabaseFromBackupTimestampDetails) o; + return java.util.Objects.equals( + this.sourceAutonomousContainerDatabaseId, + other.sourceAutonomousContainerDatabaseId) + && java.util.Objects.equals( + this.timeStampToUseForCloning, other.timeStampToUseForCloning) + && java.util.Objects.equals( + this.shouldUseLatestAvailableBackupTimeStamp, + other.shouldUseLatestAvailableBackupTimeStamp) + && java.util.Objects.equals(this.cloneType, other.cloneType) + && java.util.Objects.equals( + this.autonomousDatabasesToClone, other.autonomousDatabasesToClone) + && java.util.Objects.equals(this.cloneBandWidth, other.cloneBandWidth) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sourceAutonomousContainerDatabaseId == null + ? 43 + : this.sourceAutonomousContainerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.timeStampToUseForCloning == null + ? 43 + : this.timeStampToUseForCloning.hashCode()); + result = + (result * PRIME) + + (this.shouldUseLatestAvailableBackupTimeStamp == null + ? 43 + : this.shouldUseLatestAvailableBackupTimeStamp.hashCode()); + result = (result * PRIME) + (this.cloneType == null ? 43 : this.cloneType.hashCode()); + result = + (result * PRIME) + + (this.autonomousDatabasesToClone == null + ? 43 + : this.autonomousDatabasesToClone.hashCode()); + result = + (result * PRIME) + + (this.cloneBandWidth == null ? 43 : this.cloneBandWidth.hashCode()); + return result; + } +} 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 b4bab22508..b909439a5a 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 @@ -74,6 +74,7 @@ public class CreateAutonomousDatabaseBase @java.beans.ConstructorProperties({ "subscriptionId", "compartmentId", + "availabilityDomain", "characterSet", "ncharacterSet", "dbName", @@ -131,6 +132,7 @@ public class CreateAutonomousDatabaseBase protected CreateAutonomousDatabaseBase( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -187,6 +189,7 @@ protected CreateAutonomousDatabaseBase( super(); this.subscriptionId = subscriptionId; this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; this.characterSet = characterSet; this.ncharacterSet = ncharacterSet; this.dbName = dbName; @@ -270,6 +273,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The Autonomous Database Serverless instance's availability domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The Autonomous Database Serverless instance's availability domain. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + /** * The character set for the Autonomous AI Database. The default is AL32UTF8. Allowed values for an Autonomous AI Database Serverless instance as as returned by [List Autonomous AI Database Character Sets](https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) *

@@ -1473,6 +1490,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", characterSet=").append(String.valueOf(this.characterSet)); sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); sb.append(", dbName=").append(String.valueOf(this.dbName)); @@ -1553,6 +1571,7 @@ public boolean equals(Object o) { CreateAutonomousDatabaseBase other = (CreateAutonomousDatabaseBase) o; return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals(this.characterSet, other.characterSet) && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) && java.util.Objects.equals(this.dbName, other.dbName) @@ -1634,6 +1653,11 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); result = (result * PRIME) 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 1c27339de1..bbf84cb093 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 @@ -46,6 +46,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -571,6 +580,7 @@ public CreateAutonomousDatabaseCloneDetails build() { new CreateAutonomousDatabaseCloneDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -640,6 +650,9 @@ public Builder copy(CreateAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -827,6 +840,7 @@ public Builder toBuilder() { public CreateAutonomousDatabaseCloneDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -885,6 +899,7 @@ public CreateAutonomousDatabaseCloneDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 fe3ed727ff..6b8e666d7f 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 @@ -46,6 +46,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -539,6 +548,7 @@ public CreateAutonomousDatabaseDetails build() { new CreateAutonomousDatabaseDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -606,6 +616,9 @@ public Builder copy(CreateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -787,6 +800,7 @@ public Builder toBuilder() { public CreateAutonomousDatabaseDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -843,6 +857,7 @@ public CreateAutonomousDatabaseDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 e29345115e..2d988156de 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 @@ -46,6 +46,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -587,6 +596,7 @@ public CreateAutonomousDatabaseFromBackupDetails build() { new CreateAutonomousDatabaseFromBackupDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -657,6 +667,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -847,6 +860,7 @@ public Builder toBuilder() { public CreateAutonomousDatabaseFromBackupDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -906,6 +920,7 @@ public CreateAutonomousDatabaseFromBackupDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 d59e7f47a2..7025a130f7 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 @@ -47,6 +47,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -623,6 +632,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails build() { new CreateAutonomousDatabaseFromBackupTimestampDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -695,6 +705,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -892,6 +905,7 @@ public Builder toBuilder() { public CreateAutonomousDatabaseFromBackupTimestampDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -953,6 +967,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 44b9d9d64b..751247c759 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 @@ -65,6 +65,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -574,6 +583,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { new CreateCrossRegionAutonomousDatabaseDataGuardDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -642,6 +652,9 @@ public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -826,6 +839,7 @@ public Builder toBuilder() { public CreateCrossRegionAutonomousDatabaseDataGuardDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -883,6 +897,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 86409168cd..437eeaa9ca 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 @@ -65,6 +65,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -613,6 +622,7 @@ public CreateCrossRegionDisasterRecoveryDetails build() { new CreateCrossRegionDisasterRecoveryDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -683,6 +693,9 @@ public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -873,6 +886,7 @@ public Builder toBuilder() { public CreateCrossRegionDisasterRecoveryDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -932,6 +946,7 @@ public CreateCrossRegionDisasterRecoveryDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 295bc71568..fd9080328b 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 @@ -66,6 +66,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -614,6 +623,7 @@ public CreateCrossTenancyDisasterRecoveryDetails build() { new CreateCrossTenancyDisasterRecoveryDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -684,6 +694,9 @@ public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -874,6 +887,7 @@ public Builder toBuilder() { public CreateCrossTenancyDisasterRecoveryDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -933,6 +947,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 a9726a9635..680a4309a2 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 @@ -47,6 +47,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -658,6 +667,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails build() { new CreateRefreshableAutonomousDatabaseCloneDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -732,6 +742,9 @@ public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -934,6 +947,7 @@ public Builder toBuilder() { public CreateRefreshableAutonomousDatabaseCloneDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -997,6 +1011,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateStandbyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateStandbyDetails.java index ef26f8704e..a0b1a77296 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateStandbyDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateStandbyDetails.java @@ -33,7 +33,8 @@ public CreateStandbyDetails( TransportType transportType, DatabaseStorageSizeDetails storageSizeDetails, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + AutoFailoverConfiguration autoFailoverConfiguration) { super(); this.sourceDatabaseId = sourceDatabaseId; this.databaseAdminPassword = @@ -49,6 +50,7 @@ public CreateStandbyDetails( this.storageSizeDetails = storageSizeDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.autoFailoverConfiguration = autoFailoverConfiguration; } @com.fasterxml.jackson.annotation.JsonCreator @@ -65,7 +67,8 @@ public CreateStandbyDetails( "transportType", "storageSizeDetails", "freeformTags", - "definedTags" + "definedTags", + "autoFailoverConfiguration" }) public CreateStandbyDetails( String sourceDatabaseId, @@ -79,7 +82,8 @@ public CreateStandbyDetails( TransportType transportType, DatabaseStorageSizeDetails storageSizeDetails, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + AutoFailoverConfiguration autoFailoverConfiguration) { super(); this.sourceDatabaseId = sourceDatabaseId; this.databaseAdminPassword = databaseAdminPassword; @@ -93,6 +97,7 @@ public CreateStandbyDetails( this.storageSizeDetails = storageSizeDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.autoFailoverConfiguration = autoFailoverConfiguration; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -343,6 +348,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("autoFailoverConfiguration") + private AutoFailoverConfiguration autoFailoverConfiguration; + + public Builder autoFailoverConfiguration( + AutoFailoverConfiguration autoFailoverConfiguration) { + this.autoFailoverConfiguration = autoFailoverConfiguration; + this.__explicitlySet__.add("autoFailoverConfiguration"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -360,7 +375,8 @@ public CreateStandbyDetails build() { this.transportType, this.storageSizeDetails, this.freeformTags, - this.definedTags); + this.definedTags, + this.autoFailoverConfiguration); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -406,6 +422,9 @@ public Builder copy(CreateStandbyDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("autoFailoverConfiguration")) { + this.autoFailoverConfiguration(model.getAutoFailoverConfiguration()); + } return this; } } @@ -738,6 +757,13 @@ public java.util.Map> getDefinedTags() { return definedTags; } + @com.fasterxml.jackson.annotation.JsonProperty("autoFailoverConfiguration") + private final AutoFailoverConfiguration autoFailoverConfiguration; + + public AutoFailoverConfiguration getAutoFailoverConfiguration() { + return autoFailoverConfiguration; + } + @Override public String toString() { return this.toString(true); @@ -766,6 +792,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", storageSizeDetails=").append(String.valueOf(this.storageSizeDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", autoFailoverConfiguration=") + .append(String.valueOf(this.autoFailoverConfiguration)); sb.append(")"); return sb.toString(); } @@ -796,6 +824,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.storageSizeDetails, other.storageSizeDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.autoFailoverConfiguration, other.autoFailoverConfiguration) && super.equals(other); } @@ -841,6 +871,11 @@ public int hashCode() { : this.storageSizeDetails.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.autoFailoverConfiguration == null + ? 43 + : this.autoFailoverConfiguration.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroup.java index b9a3b42c23..569df95089 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroup.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroup.java @@ -21,12 +21,15 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class DataGuardGroup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"members", "protectionMode"}) + @java.beans.ConstructorProperties({"members", "protectionMode", "managedAutoFailOverReadiness"}) public DataGuardGroup( - java.util.List members, ProtectionMode protectionMode) { + java.util.List members, + ProtectionMode protectionMode, + ManagedAutoFailOverReadiness managedAutoFailOverReadiness) { super(); this.members = members; this.protectionMode = protectionMode; + this.managedAutoFailOverReadiness = managedAutoFailOverReadiness; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -69,12 +72,31 @@ public Builder protectionMode(ProtectionMode protectionMode) { this.__explicitlySet__.add("protectionMode"); return this; } + /** + * Specifies readiness of Managed Automatic failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailOverReadiness") + private ManagedAutoFailOverReadiness managedAutoFailOverReadiness; + + /** + * Specifies readiness of Managed Automatic failover. + * @param managedAutoFailOverReadiness the value to set + * @return this builder + **/ + public Builder managedAutoFailOverReadiness( + ManagedAutoFailOverReadiness managedAutoFailOverReadiness) { + this.managedAutoFailOverReadiness = managedAutoFailOverReadiness; + this.__explicitlySet__.add("managedAutoFailOverReadiness"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DataGuardGroup build() { - DataGuardGroup model = new DataGuardGroup(this.members, this.protectionMode); + DataGuardGroup model = + new DataGuardGroup( + this.members, this.protectionMode, this.managedAutoFailOverReadiness); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -89,6 +111,9 @@ public Builder copy(DataGuardGroup model) { if (model.wasPropertyExplicitlySet("protectionMode")) { this.protectionMode(model.getProtectionMode()); } + if (model.wasPropertyExplicitlySet("managedAutoFailOverReadiness")) { + this.managedAutoFailOverReadiness(model.getManagedAutoFailOverReadiness()); + } return this; } } @@ -190,6 +215,68 @@ public ProtectionMode getProtectionMode() { return protectionMode; } + /** + * Specifies readiness of Managed Automatic failover. + **/ + public enum ManagedAutoFailOverReadiness { + Healthy("HEALTHY"), + Critical("CRITICAL"), + + /** + * 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(ManagedAutoFailOverReadiness.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedAutoFailOverReadiness v : ManagedAutoFailOverReadiness.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ManagedAutoFailOverReadiness(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedAutoFailOverReadiness create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ManagedAutoFailOverReadiness', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies readiness of Managed Automatic failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailOverReadiness") + private final ManagedAutoFailOverReadiness managedAutoFailOverReadiness; + + /** + * Specifies readiness of Managed Automatic failover. + * @return the value + **/ + public ManagedAutoFailOverReadiness getManagedAutoFailOverReadiness() { + return managedAutoFailOverReadiness; + } + @Override public String toString() { return this.toString(true); @@ -206,6 +293,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("members=").append(String.valueOf(this.members)); sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", managedAutoFailOverReadiness=") + .append(String.valueOf(this.managedAutoFailOverReadiness)); sb.append(")"); return sb.toString(); } @@ -222,6 +311,8 @@ public boolean equals(Object o) { DataGuardGroup other = (DataGuardGroup) o; return java.util.Objects.equals(this.members, other.members) && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.managedAutoFailOverReadiness, other.managedAutoFailOverReadiness) && super.equals(other); } @@ -233,6 +324,11 @@ public int hashCode() { result = (result * PRIME) + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.managedAutoFailOverReadiness == null + ? 43 + : this.managedAutoFailOverReadiness.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroupMember.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroupMember.java index 10fc8d67ec..14baf2763c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroupMember.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardGroupMember.java @@ -36,7 +36,9 @@ public final class DataGuardGroupMember extends com.oracle.bmc.http.internal.Exp "failoverReadiness", "failoverReadinessMessage", "dataLossExposure", - "timeUpdated" + "timeUpdated", + "managedAutoFailover", + "failoverTargets" }) public DataGuardGroupMember( String dbSystemId, @@ -53,7 +55,9 @@ public DataGuardGroupMember( FailoverReadiness failoverReadiness, String failoverReadinessMessage, String dataLossExposure, - java.util.Date timeUpdated) { + java.util.Date timeUpdated, + ManagedAutoFailover managedAutoFailover, + java.util.List failoverTargets) { super(); this.dbSystemId = dbSystemId; this.databaseId = databaseId; @@ -70,6 +74,8 @@ public DataGuardGroupMember( this.failoverReadinessMessage = failoverReadinessMessage; this.dataLossExposure = dataLossExposure; this.timeUpdated = timeUpdated; + this.managedAutoFailover = managedAutoFailover; + this.failoverTargets = failoverTargets; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -262,6 +268,8 @@ public Builder isActiveDataGuardEnabled(Boolean isActiveDataGuardEnabled) { } /** * The switchover readiness status of the Data Guard member. + * * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take switchover, when auto failover is enabled. * **/ @com.fasterxml.jackson.annotation.JsonProperty("switchoverReadiness") @@ -269,6 +277,8 @@ public Builder isActiveDataGuardEnabled(Boolean isActiveDataGuardEnabled) { /** * The switchover readiness status of the Data Guard member. + * * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take switchover, when auto failover is enabled. * * @param switchoverReadiness the value to set * @return this builder @@ -300,6 +310,8 @@ public Builder switchoverReadinessMessage(String switchoverReadinessMessage) { } /** * The failover readiness status of the Data Guard member. + * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take failover, when auto failover is enabled. * **/ @com.fasterxml.jackson.annotation.JsonProperty("failoverReadiness") @@ -307,6 +319,8 @@ public Builder switchoverReadinessMessage(String switchoverReadinessMessage) { /** * The failover readiness status of the Data Guard member. + * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take failover, when auto failover is enabled. * * @param failoverReadiness the value to set * @return this builder @@ -374,6 +388,40 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * The state of managed auto failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailover") + private ManagedAutoFailover managedAutoFailover; + + /** + * The state of managed auto failover. + * @param managedAutoFailover the value to set + * @return this builder + **/ + public Builder managedAutoFailover(ManagedAutoFailover managedAutoFailover) { + this.managedAutoFailover = managedAutoFailover; + this.__explicitlySet__.add("managedAutoFailover"); + return this; + } + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failoverTargets") + private java.util.List failoverTargets; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + * @param failoverTargets the value to set + * @return this builder + **/ + public Builder failoverTargets(java.util.List failoverTargets) { + this.failoverTargets = failoverTargets; + this.__explicitlySet__.add("failoverTargets"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -395,7 +443,9 @@ public DataGuardGroupMember build() { this.failoverReadiness, this.failoverReadinessMessage, this.dataLossExposure, - this.timeUpdated); + this.timeUpdated, + this.managedAutoFailover, + this.failoverTargets); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -449,6 +499,12 @@ public Builder copy(DataGuardGroupMember model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("managedAutoFailover")) { + this.managedAutoFailover(model.getManagedAutoFailover()); + } + if (model.wasPropertyExplicitlySet("failoverTargets")) { + this.failoverTargets(model.getFailoverTargets()); + } return this; } } @@ -742,12 +798,15 @@ public Boolean getIsActiveDataGuardEnabled() { /** * The switchover readiness status of the Data Guard member. + * * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take switchover, when auto failover is enabled. * **/ public enum SwitchoverReadiness { Healthy("HEALTHY"), Warning("WARNING"), Critical("CRITICAL"), + HealthyAndNotRolechangeTarget("HEALTHY_AND_NOT_ROLECHANGE_TARGET"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -792,6 +851,8 @@ public static SwitchoverReadiness create(String key) { }; /** * The switchover readiness status of the Data Guard member. + * * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take switchover, when auto failover is enabled. * **/ @com.fasterxml.jackson.annotation.JsonProperty("switchoverReadiness") @@ -799,6 +860,8 @@ public static SwitchoverReadiness create(String key) { /** * The switchover readiness status of the Data Guard member. + * * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take switchover, when auto failover is enabled. * * @return the value **/ @@ -826,12 +889,15 @@ public String getSwitchoverReadinessMessage() { /** * The failover readiness status of the Data Guard member. + * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take failover, when auto failover is enabled. * **/ public enum FailoverReadiness { Healthy("HEALTHY"), Warning("WARNING"), Critical("CRITICAL"), + HealthyAndNotRolechangeTarget("HEALTHY_AND_NOT_ROLECHANGE_TARGET"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -876,6 +942,8 @@ public static FailoverReadiness create(String key) { }; /** * The failover readiness status of the Data Guard member. + * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take failover, when auto failover is enabled. * **/ @com.fasterxml.jackson.annotation.JsonProperty("failoverReadiness") @@ -883,6 +951,8 @@ public static FailoverReadiness create(String key) { /** * The failover readiness status of the Data Guard member. + * HEALTHY_AND_NOT_ROLECHANGE_TARGET - Indicates that the respective standby member is healthy + * but not currently designated to take failover, when auto failover is enabled. * * @return the value **/ @@ -942,6 +1012,84 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * The state of managed auto failover. + **/ + public enum ManagedAutoFailover { + Enable("ENABLE"), + Disable("DISABLE"), + + /** + * 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(ManagedAutoFailover.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedAutoFailover v : ManagedAutoFailover.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ManagedAutoFailover(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedAutoFailover create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ManagedAutoFailover', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The state of managed auto failover. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedAutoFailover") + private final ManagedAutoFailover managedAutoFailover; + + /** + * The state of managed auto failover. + * @return the value + **/ + public ManagedAutoFailover getManagedAutoFailover() { + return managedAutoFailover; + } + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failoverTargets") + private final java.util.List failoverTargets; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the data guard group member databases. + * + * @return the value + **/ + public java.util.List getFailoverTargets() { + return failoverTargets; + } + @Override public String toString() { return this.toString(true); @@ -974,6 +1122,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.failoverReadinessMessage)); sb.append(", dataLossExposure=").append(String.valueOf(this.dataLossExposure)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", managedAutoFailover=").append(String.valueOf(this.managedAutoFailover)); + sb.append(", failoverTargets=").append(String.valueOf(this.failoverTargets)); sb.append(")"); return sb.toString(); } @@ -1006,6 +1156,8 @@ public boolean equals(Object o) { this.failoverReadinessMessage, other.failoverReadinessMessage) && java.util.Objects.equals(this.dataLossExposure, other.dataLossExposure) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.managedAutoFailover, other.managedAutoFailover) + && java.util.Objects.equals(this.failoverTargets, other.failoverTargets) && super.equals(other); } @@ -1054,6 +1206,14 @@ public int hashCode() { (result * PRIME) + (this.dataLossExposure == null ? 43 : this.dataLossExposure.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.managedAutoFailover == null + ? 43 + : this.managedAutoFailover.hashCode()); + result = + (result * PRIME) + + (this.failoverTargets == null ? 43 : this.failoverTargets.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } 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 1e6a3d4259..227111a5f0 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 @@ -46,6 +46,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") private String characterSet; @@ -555,6 +564,7 @@ public UndeleteAutonomousDatabaseDetails build() { new UndeleteAutonomousDatabaseDetails( this.subscriptionId, this.compartmentId, + this.availabilityDomain, this.characterSet, this.ncharacterSet, this.dbName, @@ -623,6 +633,9 @@ public Builder copy(UndeleteAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } if (model.wasPropertyExplicitlySet("characterSet")) { this.characterSet(model.getCharacterSet()); } @@ -807,6 +820,7 @@ public Builder toBuilder() { public UndeleteAutonomousDatabaseDetails( String subscriptionId, String compartmentId, + String availabilityDomain, String characterSet, String ncharacterSet, String dbName, @@ -864,6 +878,7 @@ public UndeleteAutonomousDatabaseDetails( super( subscriptionId, compartmentId, + availabilityDomain, characterSet, ncharacterSet, dbName, 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 aebec0e111..6ac576ca21 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 @@ -43,6 +43,10 @@ public final class UpdateAutonomousDatabaseDetails "dataStorageSizeInGBs", "displayName", "isFreeTier", + "availabilityDomain", + "timeScheduledAdUpdate", + "isDisableAdUpdateSchedule", + "isScheduleAdUpdateToEarliest", "adminPassword", "dbName", "freeformTags", @@ -107,6 +111,10 @@ public UpdateAutonomousDatabaseDetails( Integer dataStorageSizeInGBs, String displayName, Boolean isFreeTier, + String availabilityDomain, + java.util.Date timeScheduledAdUpdate, + Boolean isDisableAdUpdateSchedule, + Boolean isScheduleAdUpdateToEarliest, String adminPassword, String dbName, java.util.Map freeformTags, @@ -170,6 +178,10 @@ public UpdateAutonomousDatabaseDetails( this.dataStorageSizeInGBs = dataStorageSizeInGBs; this.displayName = displayName; this.isFreeTier = isFreeTier; + this.availabilityDomain = availabilityDomain; + this.timeScheduledAdUpdate = timeScheduledAdUpdate; + this.isDisableAdUpdateSchedule = isDisableAdUpdateSchedule; + this.isScheduleAdUpdateToEarliest = isScheduleAdUpdateToEarliest; this.adminPassword = adminPassword; this.dbName = dbName; this.freeformTags = freeformTags; @@ -498,6 +510,70 @@ public Builder isFreeTier(Boolean isFreeTier) { this.__explicitlySet__.add("isFreeTier"); return this; } + /** + * The Autonomous Database Serverless instance's availability domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The Autonomous Database Serverless instance's availability domain. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The date and time when the Autonomous Database availability domain is to be updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private java.util.Date timeScheduledAdUpdate; + + /** + * The date and time when the Autonomous Database availability domain is to be updated. + * @param timeScheduledAdUpdate the value to set + * @return this builder + **/ + public Builder timeScheduledAdUpdate(java.util.Date timeScheduledAdUpdate) { + this.timeScheduledAdUpdate = timeScheduledAdUpdate; + this.__explicitlySet__.add("timeScheduledAdUpdate"); + return this; + } + /** + * True, if you want to disable Autonomous Database availability domain scheduled update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisableAdUpdateSchedule") + private Boolean isDisableAdUpdateSchedule; + + /** + * True, if you want to disable Autonomous Database availability domain scheduled update. + * @param isDisableAdUpdateSchedule the value to set + * @return this builder + **/ + public Builder isDisableAdUpdateSchedule(Boolean isDisableAdUpdateSchedule) { + this.isDisableAdUpdateSchedule = isDisableAdUpdateSchedule; + this.__explicitlySet__.add("isDisableAdUpdateSchedule"); + return this; + } + /** + * True, if you want to schedule Autonomous Database availability domain update to the earliest available time. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isScheduleAdUpdateToEarliest") + private Boolean isScheduleAdUpdateToEarliest; + + /** + * True, if you want to schedule Autonomous Database availability domain update to the earliest available time. + * @param isScheduleAdUpdateToEarliest the value to set + * @return this builder + **/ + public Builder isScheduleAdUpdateToEarliest(Boolean isScheduleAdUpdateToEarliest) { + this.isScheduleAdUpdateToEarliest = isScheduleAdUpdateToEarliest; + this.__explicitlySet__.add("isScheduleAdUpdateToEarliest"); + return this; + } /** * The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. It must be different from the last four passwords and it must not be a password used within the last 24 hours. *

@@ -1609,6 +1685,10 @@ public UpdateAutonomousDatabaseDetails build() { this.dataStorageSizeInGBs, this.displayName, this.isFreeTier, + this.availabilityDomain, + this.timeScheduledAdUpdate, + this.isDisableAdUpdateSchedule, + this.isScheduleAdUpdateToEarliest, this.adminPassword, this.dbName, this.freeformTags, @@ -1706,6 +1786,18 @@ public Builder copy(UpdateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("isFreeTier")) { this.isFreeTier(model.getIsFreeTier()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeScheduledAdUpdate")) { + this.timeScheduledAdUpdate(model.getTimeScheduledAdUpdate()); + } + if (model.wasPropertyExplicitlySet("isDisableAdUpdateSchedule")) { + this.isDisableAdUpdateSchedule(model.getIsDisableAdUpdateSchedule()); + } + if (model.wasPropertyExplicitlySet("isScheduleAdUpdateToEarliest")) { + this.isScheduleAdUpdateToEarliest(model.getIsScheduleAdUpdateToEarliest()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -2154,6 +2246,62 @@ public Boolean getIsFreeTier() { return isFreeTier; } + /** + * The Autonomous Database Serverless instance's availability domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The Autonomous Database Serverless instance's availability domain. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The date and time when the Autonomous Database availability domain is to be updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledAdUpdate") + private final java.util.Date timeScheduledAdUpdate; + + /** + * The date and time when the Autonomous Database availability domain is to be updated. + * @return the value + **/ + public java.util.Date getTimeScheduledAdUpdate() { + return timeScheduledAdUpdate; + } + + /** + * True, if you want to disable Autonomous Database availability domain scheduled update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisableAdUpdateSchedule") + private final Boolean isDisableAdUpdateSchedule; + + /** + * True, if you want to disable Autonomous Database availability domain scheduled update. + * @return the value + **/ + public Boolean getIsDisableAdUpdateSchedule() { + return isDisableAdUpdateSchedule; + } + + /** + * True, if you want to schedule Autonomous Database availability domain update to the earliest available time. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isScheduleAdUpdateToEarliest") + private final Boolean isScheduleAdUpdateToEarliest; + + /** + * True, if you want to schedule Autonomous Database availability domain update to the earliest available time. + * @return the value + **/ + public Boolean getIsScheduleAdUpdateToEarliest() { + return isScheduleAdUpdateToEarliest; + } + /** * The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. It must be different from the last four passwords and it must not be a password used within the last 24 hours. *

@@ -3408,6 +3556,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", isFreeTier=").append(String.valueOf(this.isFreeTier)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeScheduledAdUpdate=").append(String.valueOf(this.timeScheduledAdUpdate)); + sb.append(", isDisableAdUpdateSchedule=") + .append(String.valueOf(this.isDisableAdUpdateSchedule)); + sb.append(", isScheduleAdUpdateToEarliest=") + .append(String.valueOf(this.isScheduleAdUpdateToEarliest)); sb.append(", adminPassword=").append(String.valueOf(this.adminPassword)); sb.append(", dbName=").append(String.valueOf(this.dbName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -3502,6 +3656,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.isFreeTier, other.isFreeTier) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeScheduledAdUpdate, other.timeScheduledAdUpdate) + && java.util.Objects.equals( + this.isDisableAdUpdateSchedule, other.isDisableAdUpdateSchedule) + && java.util.Objects.equals( + this.isScheduleAdUpdateToEarliest, other.isScheduleAdUpdateToEarliest) && java.util.Objects.equals(this.adminPassword, other.adminPassword) && java.util.Objects.equals(this.dbName, other.dbName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -3615,6 +3775,26 @@ public int hashCode() { : this.dataStorageSizeInGBs.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.isFreeTier == null ? 43 : this.isFreeTier.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledAdUpdate == null + ? 43 + : this.timeScheduledAdUpdate.hashCode()); + result = + (result * PRIME) + + (this.isDisableAdUpdateSchedule == null + ? 43 + : this.isDisableAdUpdateSchedule.hashCode()); + result = + (result * PRIME) + + (this.isScheduleAdUpdateToEarliest == null + ? 43 + : this.isScheduleAdUpdateToEarliest.hashCode()); result = (result * PRIME) + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java index 0bb2065ca0..145c56b798 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java @@ -35,7 +35,12 @@ public UpdateDatabaseDetails( java.util.Map freeformTags, java.util.Map> definedTags, ManagedSoftwareUpdateInputDetails managedSoftwareUpdateDetails, - PatchOptions patchOptions) { + PatchOptions patchOptions, + String databaseAdminPassword, + ProtectionMode protectionMode, + TransportType transportType, + Boolean isActiveDataGuardEnabled, + AutoFailoverConfiguration autoFailoverConfiguration) { super(); this.dbBackupConfig = dbBackupConfig; this.dbHomeId = dbHomeId; @@ -49,6 +54,12 @@ public UpdateDatabaseDetails( this.definedTags = definedTags; this.managedSoftwareUpdateDetails = managedSoftwareUpdateDetails; this.patchOptions = patchOptions; + this.databaseAdminPassword = + databaseAdminPassword != null ? databaseAdminPassword.toCharArray() : null; + this.protectionMode = protectionMode; + this.transportType = transportType; + this.isActiveDataGuardEnabled = isActiveDataGuardEnabled; + this.autoFailoverConfiguration = autoFailoverConfiguration; } @com.fasterxml.jackson.annotation.JsonCreator @@ -63,7 +74,12 @@ public UpdateDatabaseDetails( "freeformTags", "definedTags", "managedSoftwareUpdateDetails", - "patchOptions" + "patchOptions", + "databaseAdminPassword", + "protectionMode", + "transportType", + "isActiveDataGuardEnabled", + "autoFailoverConfiguration" }) public UpdateDatabaseDetails( DbBackupConfig dbBackupConfig, @@ -75,7 +91,12 @@ public UpdateDatabaseDetails( java.util.Map freeformTags, java.util.Map> definedTags, ManagedSoftwareUpdateInputDetails managedSoftwareUpdateDetails, - PatchOptions patchOptions) { + PatchOptions patchOptions, + char[] databaseAdminPassword, + ProtectionMode protectionMode, + TransportType transportType, + Boolean isActiveDataGuardEnabled, + AutoFailoverConfiguration autoFailoverConfiguration) { super(); this.dbBackupConfig = dbBackupConfig; this.dbHomeId = dbHomeId; @@ -87,6 +108,11 @@ public UpdateDatabaseDetails( this.definedTags = definedTags; this.managedSoftwareUpdateDetails = managedSoftwareUpdateDetails; this.patchOptions = patchOptions; + this.databaseAdminPassword = databaseAdminPassword; + this.protectionMode = protectionMode; + this.transportType = transportType; + this.isActiveDataGuardEnabled = isActiveDataGuardEnabled; + this.autoFailoverConfiguration = autoFailoverConfiguration; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -260,6 +286,122 @@ public Builder patchOptions(PatchOptions patchOptions) { this.__explicitlySet__.add("patchOptions"); return this; } + /** + * The administrator password of the primary database in this Data Guard association. + *

+ **The password MUST be the same as the primary admin password.** + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseAdminPassword") + private char[] databaseAdminPassword; + + /** + * The administrator password of the primary database in this Data Guard association. + *

+ **The password MUST be the same as the primary admin password.** + * + * @param databaseAdminPassword the value to set + * @return this builder + **/ + public Builder databaseAdminPassword(char[] databaseAdminPassword) { + this.databaseAdminPassword = databaseAdminPassword; + this.__explicitlySet__.add("databaseAdminPassword"); + return this; + } + + public Builder databaseAdminPassword(String databaseAdminPassword) { + this.databaseAdminPassword = + databaseAdminPassword != null ? databaseAdminPassword.toCharArray() : null; + this.__explicitlySet__.add("databaseAdminPassword"); + return this; + } + + /** + * The protection mode of this Data Guard. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + /** + * The protection mode of this Data Guard. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The redo transport type to use for this Data Guard association. Valid values depend on the specified {@code protectionMode}: + *

+ * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + * * MAXIMUM_PERFORMANCE - ASYNC + * * MAXIMUM_PROTECTION - SYNC + *

+ * For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + *

+ **IMPORTANT** - The only transport type currently supported by the Database service is ASYNC. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private TransportType transportType; + + /** + * The redo transport type to use for this Data Guard association. Valid values depend on the specified {@code protectionMode}: + *

+ * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + * * MAXIMUM_PERFORMANCE - ASYNC + * * MAXIMUM_PROTECTION - SYNC + *

+ * For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + *

+ **IMPORTANT** - The only transport type currently supported by the Database service is ASYNC. + * + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(TransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + /** + * True if active Data Guard is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isActiveDataGuardEnabled") + private Boolean isActiveDataGuardEnabled; + + /** + * True if active Data Guard is enabled. + * @param isActiveDataGuardEnabled the value to set + * @return this builder + **/ + public Builder isActiveDataGuardEnabled(Boolean isActiveDataGuardEnabled) { + this.isActiveDataGuardEnabled = isActiveDataGuardEnabled; + this.__explicitlySet__.add("isActiveDataGuardEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoFailoverConfiguration") + private AutoFailoverConfiguration autoFailoverConfiguration; + + public Builder autoFailoverConfiguration( + AutoFailoverConfiguration autoFailoverConfiguration) { + this.autoFailoverConfiguration = autoFailoverConfiguration; + this.__explicitlySet__.add("autoFailoverConfiguration"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -276,7 +418,12 @@ public UpdateDatabaseDetails build() { this.freeformTags, this.definedTags, this.managedSoftwareUpdateDetails, - this.patchOptions); + this.patchOptions, + this.databaseAdminPassword, + this.protectionMode, + this.transportType, + this.isActiveDataGuardEnabled, + this.autoFailoverConfiguration); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -315,6 +462,21 @@ public Builder copy(UpdateDatabaseDetails model) { if (model.wasPropertyExplicitlySet("patchOptions")) { this.patchOptions(model.getPatchOptions()); } + if (model.wasPropertyExplicitlySet("databaseAdminPassword")) { + this.databaseAdminPassword(model.getDatabaseAdminPassword()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + if (model.wasPropertyExplicitlySet("isActiveDataGuardEnabled")) { + this.isActiveDataGuardEnabled(model.getIsActiveDataGuardEnabled()); + } + if (model.wasPropertyExplicitlySet("autoFailoverConfiguration")) { + this.autoFailoverConfiguration(model.getAutoFailoverConfiguration()); + } return this; } } @@ -490,6 +652,203 @@ public PatchOptions getPatchOptions() { return patchOptions; } + /** + * The administrator password of the primary database in this Data Guard association. + *

+ **The password MUST be the same as the primary admin password.** + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseAdminPassword") + private final char[] databaseAdminPassword; + + /** + * The administrator password of the primary database in this Data Guard association. + * <p> + **The password MUST be the same as the primary admin password.** + * + * return the value + * @Deprecated - Use getDatabaseAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getDatabaseAdminPassword() { + return databaseAdminPassword != null ? new String(databaseAdminPassword) : null; + } + + /** + * The administrator password of the primary database in this Data Guard association. + *

+ **The password MUST be the same as the primary admin password.** + * + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseAdminPassword") + public char[] getDatabaseAdminPassword__AsCharArray() { + return databaseAdminPassword; + } + /** + * The protection mode of this Data Guard. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ + public enum ProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + MaximumProtection("MAXIMUM_PROTECTION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ProtectionMode v : ProtectionMode.values()) { + map.put(v.getValue(), v); + } + } + + ProtectionMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ProtectionMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ProtectionMode: " + key); + } + }; + /** + * The protection mode of this Data Guard. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final ProtectionMode protectionMode; + + /** + * The protection mode of this Data Guard. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + * @return the value + **/ + public ProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The redo transport type to use for this Data Guard association. Valid values depend on the specified {@code protectionMode}: + *

+ * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + * * MAXIMUM_PERFORMANCE - ASYNC + * * MAXIMUM_PROTECTION - SYNC + *

+ * For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + *

+ **IMPORTANT** - The only transport type currently supported by the Database service is ASYNC. + * + **/ + public enum TransportType { + Sync("SYNC"), + Async("ASYNC"), + Fastsync("FASTSYNC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TransportType v : TransportType.values()) { + map.put(v.getValue(), v); + } + } + + TransportType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TransportType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid TransportType: " + key); + } + }; + /** + * The redo transport type to use for this Data Guard association. Valid values depend on the specified {@code protectionMode}: + *

+ * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + * * MAXIMUM_PERFORMANCE - ASYNC + * * MAXIMUM_PROTECTION - SYNC + *

+ * For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + *

+ **IMPORTANT** - The only transport type currently supported by the Database service is ASYNC. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final TransportType transportType; + + /** + * The redo transport type to use for this Data Guard association. Valid values depend on the specified {@code protectionMode}: + *

+ * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + * * MAXIMUM_PERFORMANCE - ASYNC + * * MAXIMUM_PROTECTION - SYNC + *

+ * For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + *

+ **IMPORTANT** - The only transport type currently supported by the Database service is ASYNC. + * + * @return the value + **/ + public TransportType getTransportType() { + return transportType; + } + + /** + * True if active Data Guard is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isActiveDataGuardEnabled") + private final Boolean isActiveDataGuardEnabled; + + /** + * True if active Data Guard is enabled. + * @return the value + **/ + public Boolean getIsActiveDataGuardEnabled() { + return isActiveDataGuardEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoFailoverConfiguration") + private final AutoFailoverConfiguration autoFailoverConfiguration; + + public AutoFailoverConfiguration getAutoFailoverConfiguration() { + return autoFailoverConfiguration; + } + @Override public String toString() { return this.toString(true); @@ -515,6 +874,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", managedSoftwareUpdateDetails=") .append(String.valueOf(this.managedSoftwareUpdateDetails)); sb.append(", patchOptions=").append(String.valueOf(this.patchOptions)); + sb.append(", databaseAdminPassword=").append(""); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(", isActiveDataGuardEnabled=") + .append(String.valueOf(this.isActiveDataGuardEnabled)); + sb.append(", autoFailoverConfiguration=") + .append(String.valueOf(this.autoFailoverConfiguration)); sb.append(")"); return sb.toString(); } @@ -540,6 +906,13 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.managedSoftwareUpdateDetails, other.managedSoftwareUpdateDetails) && java.util.Objects.equals(this.patchOptions, other.patchOptions) + && java.util.Objects.equals(this.databaseAdminPassword, other.databaseAdminPassword) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && java.util.Objects.equals( + this.isActiveDataGuardEnabled, other.isActiveDataGuardEnabled) + && java.util.Objects.equals( + this.autoFailoverConfiguration, other.autoFailoverConfiguration) && super.equals(other); } @@ -577,6 +950,27 @@ public int hashCode() { ? 43 : this.managedSoftwareUpdateDetails.hashCode()); result = (result * PRIME) + (this.patchOptions == null ? 43 : this.patchOptions.hashCode()); + result = + (result * PRIME) + + (this.databaseAdminPassword == null + ? 43 + : this.databaseAdminPassword.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + result = + (result * PRIME) + + (this.isActiveDataGuardEnabled == null + ? 43 + : this.isActiveDataGuardEnabled.hashCode()); + result = + (result * PRIME) + + (this.autoFailoverConfiguration == null + ? 43 + : this.autoFailoverConfiguration.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousContainerDatabaseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousContainerDatabaseBackupRequest.java new file mode 100644 index 0000000000..b5772a8690 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousContainerDatabaseBackupRequest.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetAutonomousContainerDatabaseBackupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetAutonomousContainerDatabaseBackupRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Autonomous Container Database backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseBackupId; + + /** + * The Autonomous Container Database backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + public String getAutonomousContainerDatabaseBackupId() { + return autonomousContainerDatabaseBackupId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetAutonomousContainerDatabaseBackupRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Autonomous Container Database backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseBackupId = null; + + /** + * The Autonomous Container Database backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param autonomousContainerDatabaseBackupId the value to set + * @return this builder instance + */ + public Builder autonomousContainerDatabaseBackupId( + String autonomousContainerDatabaseBackupId) { + this.autonomousContainerDatabaseBackupId = autonomousContainerDatabaseBackupId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @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.util.internal.Consumer + 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(GetAutonomousContainerDatabaseBackupRequest o) { + autonomousContainerDatabaseBackupId(o.getAutonomousContainerDatabaseBackupId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAutonomousContainerDatabaseBackupRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAutonomousContainerDatabaseBackupRequest + */ + public GetAutonomousContainerDatabaseBackupRequest build() { + GetAutonomousContainerDatabaseBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetAutonomousContainerDatabaseBackupRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetAutonomousContainerDatabaseBackupRequest + */ + public GetAutonomousContainerDatabaseBackupRequest buildWithoutInvocationCallback() { + GetAutonomousContainerDatabaseBackupRequest request = + new GetAutonomousContainerDatabaseBackupRequest(); + request.autonomousContainerDatabaseBackupId = autonomousContainerDatabaseBackupId; + request.opcRequestId = opcRequestId; + return request; + // new GetAutonomousContainerDatabaseBackupRequest(autonomousContainerDatabaseBackupId, 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() + .autonomousContainerDatabaseBackupId(autonomousContainerDatabaseBackupId) + .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(",autonomousContainerDatabaseBackupId=") + .append(String.valueOf(this.autonomousContainerDatabaseBackupId)); + 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 GetAutonomousContainerDatabaseBackupRequest)) { + return false; + } + + GetAutonomousContainerDatabaseBackupRequest other = + (GetAutonomousContainerDatabaseBackupRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseBackupId, + other.autonomousContainerDatabaseBackupId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseBackupId == null + ? 43 + : this.autonomousContainerDatabaseBackupId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java index 00d8de2eab..22c8ef1b13 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java @@ -229,6 +229,19 @@ public String getKeyStoreId() { getInfrastructureType() { return infrastructureType; } + /** + * Filters backups based on the current Autonomous AI Database configuration; returns only those relevant for point-in-time recovery (PITR). Does not guarantee exclusion of backups in orphan ranges. + * + */ + private Boolean isPitrEligible; + + /** + * Filters backups based on the current Autonomous AI Database configuration; returns only those relevant for point-in-time recovery (PITR). Does not guarantee exclusion of backups in orphan ranges. + * + */ + public Boolean getIsPitrEligible() { + return isPitrEligible; + } /** * Unique identifier for the request. * @@ -442,6 +455,23 @@ public Builder infrastructureType( return this; } + /** + * Filters backups based on the current Autonomous AI Database configuration; returns only those relevant for point-in-time recovery (PITR). Does not guarantee exclusion of backups in orphan ranges. + * + */ + private Boolean isPitrEligible = null; + + /** + * Filters backups based on the current Autonomous AI Database configuration; returns only those relevant for point-in-time recovery (PITR). Does not guarantee exclusion of backups in orphan ranges. + * + * @param isPitrEligible the value to set + * @return this builder instance + */ + public Builder isPitrEligible(Boolean isPitrEligible) { + this.isPitrEligible = isPitrEligible; + return this; + } + /** * Unique identifier for the request. * @@ -499,6 +529,7 @@ public Builder copy(ListAutonomousDatabaseBackupsRequest o) { backupDestinationId(o.getBackupDestinationId()); keyStoreId(o.getKeyStoreId()); infrastructureType(o.getInfrastructureType()); + isPitrEligible(o.getIsPitrEligible()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -545,9 +576,10 @@ public ListAutonomousDatabaseBackupsRequest buildWithoutInvocationCallback() { request.backupDestinationId = backupDestinationId; request.keyStoreId = keyStoreId; request.infrastructureType = infrastructureType; + request.isPitrEligible = isPitrEligible; request.opcRequestId = opcRequestId; return request; - // new ListAutonomousDatabaseBackupsRequest(autonomousDatabaseId, compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, type, backupDestinationId, keyStoreId, infrastructureType, opcRequestId); + // new ListAutonomousDatabaseBackupsRequest(autonomousDatabaseId, compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, type, backupDestinationId, keyStoreId, infrastructureType, isPitrEligible, opcRequestId); } } @@ -569,6 +601,7 @@ public Builder toBuilder() { .backupDestinationId(backupDestinationId) .keyStoreId(keyStoreId) .infrastructureType(infrastructureType) + .isPitrEligible(isPitrEligible) .opcRequestId(opcRequestId); } @@ -597,6 +630,7 @@ public String toString() { sb.append(",backupDestinationId=").append(String.valueOf(this.backupDestinationId)); sb.append(",keyStoreId=").append(String.valueOf(this.keyStoreId)); sb.append(",infrastructureType=").append(String.valueOf(this.infrastructureType)); + sb.append(",isPitrEligible=").append(String.valueOf(this.isPitrEligible)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -625,6 +659,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupDestinationId, other.backupDestinationId) && java.util.Objects.equals(this.keyStoreId, other.keyStoreId) && java.util.Objects.equals(this.infrastructureType, other.infrastructureType) + && java.util.Objects.equals(this.isPitrEligible, other.isPitrEligible) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -660,6 +695,9 @@ public int hashCode() { + (this.infrastructureType == null ? 43 : this.infrastructureType.hashCode()); + result = + (result * PRIME) + + (this.isPitrEligible == null ? 43 : this.isPitrEligible.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.java new file mode 100644 index 0000000000..bbb3fb6e7b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Autonomous Container Database [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseId; + + /** + * The Autonomous Container Database [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + public String getAutonomousContainerDatabaseId() { + return autonomousContainerDatabaseId; + } + /** + * The timestamp at which the list of autonomous databases present to be returned (ISO-8601 format, e.g., "2025-12-02T06:39:15Z"). The requested value must be after the end timestamp of the oldest available Autonomous Container Database backup. + */ + private java.util.Date timeStampRequested; + + /** + * The timestamp at which the list of autonomous databases present to be returned (ISO-8601 format, e.g., "2025-12-02T06:39:15Z"). The requested value must be after the end timestamp of the oldest available Autonomous Container Database backup. + */ + public java.util.Date getTimeStampRequested() { + return timeStampRequested; + } + /** + * The compartment [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If not provided, uses the Autonomous Container Database's compartment. + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If not provided, uses the Autonomous Container Database's compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest, + java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Autonomous Container Database [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseId = null; + + /** + * The Autonomous Container Database [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param autonomousContainerDatabaseId the value to set + * @return this builder instance + */ + public Builder autonomousContainerDatabaseId(String autonomousContainerDatabaseId) { + this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + return this; + } + + /** + * The timestamp at which the list of autonomous databases present to be returned (ISO-8601 format, e.g., "2025-12-02T06:39:15Z"). The requested value must be after the end timestamp of the oldest available Autonomous Container Database backup. + */ + private java.util.Date timeStampRequested = null; + + /** + * The timestamp at which the list of autonomous databases present to be returned (ISO-8601 format, e.g., "2025-12-02T06:39:15Z"). The requested value must be after the end timestamp of the oldest available Autonomous Container Database backup. + * @param timeStampRequested the value to set + * @return this builder instance + */ + public Builder timeStampRequested(java.util.Date timeStampRequested) { + this.timeStampRequested = timeStampRequested; + return this; + } + + /** + * The compartment [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If not provided, uses the Autonomous Container Database's compartment. + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If not provided, uses the Autonomous Container Database's compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @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.util.internal.Consumer + 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(ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest o) { + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + timeStampRequested(o.getTimeStampRequested()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + */ + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest build() { + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + */ + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest + buildWithoutInvocationCallback() { + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest request = + new ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest(); + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.timeStampRequested = timeStampRequested; + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest(autonomousContainerDatabaseId, timeStampRequested, compartmentId, limit, page, 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() + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .timeStampRequested(timeStampRequested) + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .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(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + sb.append(",timeStampRequested=").append(String.valueOf(this.timeStampRequested)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + 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 ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest)) { + return false; + } + + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest other = + (ListAutonomousDatabasesInAutonomousContainerDatabaseBackupRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && java.util.Objects.equals(this.timeStampRequested, other.timeStampRequested) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.timeStampRequested == null + ? 43 + : this.timeStampRequested.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.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.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabasesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabasesRequest.java index 52f1b4b193..a4ebbc8e6b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabasesRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabasesRequest.java @@ -182,6 +182,102 @@ public com.oracle.bmc.database.model.DatabaseSummary.LifecycleState getLifecycle public String getDbName() { return dbName; } + /** + * Filter the databases by managed auto failover param. + */ + private ManagedAutoFailover managedAutoFailover; + + /** + * Filter the databases by managed auto failover param. + **/ + public enum ManagedAutoFailover { + Registered("REGISTERED"), + Unregistered("UNREGISTERED"), + All("ALL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedAutoFailover v : ManagedAutoFailover.values()) { + map.put(v.getValue(), v); + } + } + + ManagedAutoFailover(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedAutoFailover create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ManagedAutoFailover: " + key); + } + }; + + /** + * Filter the databases by managed auto failover param. + */ + public ManagedAutoFailover getManagedAutoFailover() { + return managedAutoFailover; + } + /** + * Filter the databases by failoverTargets param. + */ + private FailoverTargets failoverTargets; + + /** + * Filter the databases by failoverTargets param. + **/ + public enum FailoverTargets { + Defined("DEFINED"), + Undefined("UNDEFINED"), + All("ALL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FailoverTargets v : FailoverTargets.values()) { + map.put(v.getValue(), v); + } + } + + FailoverTargets(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FailoverTargets create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid FailoverTargets: " + key); + } + }; + + /** + * Filter the databases by failoverTargets param. + */ + public FailoverTargets getFailoverTargets() { + return failoverTargets; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -326,6 +422,36 @@ public Builder dbName(String dbName) { return this; } + /** + * Filter the databases by managed auto failover param. + */ + private ManagedAutoFailover managedAutoFailover = null; + + /** + * Filter the databases by managed auto failover param. + * @param managedAutoFailover the value to set + * @return this builder instance + */ + public Builder managedAutoFailover(ManagedAutoFailover managedAutoFailover) { + this.managedAutoFailover = managedAutoFailover; + return this; + } + + /** + * Filter the databases by failoverTargets param. + */ + private FailoverTargets failoverTargets = null; + + /** + * Filter the databases by failoverTargets param. + * @param failoverTargets the value to set + * @return this builder instance + */ + public Builder failoverTargets(FailoverTargets failoverTargets) { + this.failoverTargets = failoverTargets; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -363,6 +489,8 @@ public Builder copy(ListDatabasesRequest o) { sortOrder(o.getSortOrder()); lifecycleState(o.getLifecycleState()); dbName(o.getDbName()); + managedAutoFailover(o.getManagedAutoFailover()); + failoverTargets(o.getFailoverTargets()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -404,8 +532,10 @@ public ListDatabasesRequest buildWithoutInvocationCallback() { request.sortOrder = sortOrder; request.lifecycleState = lifecycleState; request.dbName = dbName; + request.managedAutoFailover = managedAutoFailover; + request.failoverTargets = failoverTargets; return request; - // new ListDatabasesRequest(compartmentId, dbHomeId, systemId, limit, page, sortBy, sortOrder, lifecycleState, dbName); + // new ListDatabasesRequest(compartmentId, dbHomeId, systemId, limit, page, sortBy, sortOrder, lifecycleState, dbName, managedAutoFailover, failoverTargets); } } @@ -423,7 +553,9 @@ public Builder toBuilder() { .sortBy(sortBy) .sortOrder(sortOrder) .lifecycleState(lifecycleState) - .dbName(dbName); + .dbName(dbName) + .managedAutoFailover(managedAutoFailover) + .failoverTargets(failoverTargets); } /** @@ -448,6 +580,8 @@ public String toString() { sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",dbName=").append(String.valueOf(this.dbName)); + sb.append(",managedAutoFailover=").append(String.valueOf(this.managedAutoFailover)); + sb.append(",failoverTargets=").append(String.valueOf(this.failoverTargets)); sb.append(")"); return sb.toString(); } @@ -471,7 +605,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortBy, other.sortBy) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) - && java.util.Objects.equals(this.dbName, other.dbName); + && java.util.Objects.equals(this.dbName, other.dbName) + && java.util.Objects.equals(this.managedAutoFailover, other.managedAutoFailover) + && java.util.Objects.equals(this.failoverTargets, other.failoverTargets); } @Override @@ -491,6 +627,14 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.dbName == null ? 43 : this.dbName.hashCode()); + result = + (result * PRIME) + + (this.managedAutoFailover == null + ? 43 + : this.managedAutoFailover.hashCode()); + result = + (result * PRIME) + + (this.failoverTargets == null ? 43 : this.failoverTargets.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousContainerDatabaseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousContainerDatabaseBackupResponse.java new file mode 100644 index 0000000000..55640c16f8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousContainerDatabaseBackupResponse.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetAutonomousContainerDatabaseBackupResponse + 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 returned AutonomousContainerDatabaseBackup instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + autonomousContainerDatabaseBackup; + + /** + * The returned AutonomousContainerDatabaseBackup instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + getAutonomousContainerDatabaseBackup() { + return autonomousContainerDatabaseBackup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "autonomousContainerDatabaseBackup" + }) + private GetAutonomousContainerDatabaseBackupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + autonomousContainerDatabaseBackup) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.autonomousContainerDatabaseBackup = autonomousContainerDatabaseBackup; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned AutonomousContainerDatabaseBackup instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + autonomousContainerDatabaseBackup; + + /** + * The returned AutonomousContainerDatabaseBackup instance. + * @param autonomousContainerDatabaseBackup the value to set + * @return this builder + */ + public Builder autonomousContainerDatabaseBackup( + com.oracle.bmc.database.model.AutonomousContainerDatabaseBackup + autonomousContainerDatabaseBackup) { + this.autonomousContainerDatabaseBackup = autonomousContainerDatabaseBackup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousContainerDatabaseBackupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + autonomousContainerDatabaseBackup(o.getAutonomousContainerDatabaseBackup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetAutonomousContainerDatabaseBackupResponse build() { + return new GetAutonomousContainerDatabaseBackupResponse( + __httpStatusCode__, headers, opcRequestId, autonomousContainerDatabaseBackup); + } + } + + /** + * 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(",autonomousContainerDatabaseBackup=") + .append(String.valueOf(autonomousContainerDatabaseBackup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAutonomousContainerDatabaseBackupResponse)) { + return false; + } + + GetAutonomousContainerDatabaseBackupResponse other = + (GetAutonomousContainerDatabaseBackupResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.autonomousContainerDatabaseBackup, + other.autonomousContainerDatabaseBackup); + } + + @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.autonomousContainerDatabaseBackup == null + ? 43 + : this.autonomousContainerDatabaseBackup.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse.java new file mode 100644 index 0000000000..b127b8e744 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse + 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 there are additional items still to get. Include this value as the {@code page} parameter for the subsequent GET request. For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then there are additional items still to get. Include this value as the {@code page} parameter for the subsequent GET request. For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned AutonomousDatabaseInBackupCollection instance. + */ + private com.oracle.bmc.database.model.AutonomousDatabaseInBackupCollection + autonomousDatabaseInBackupCollection; + + /** + * The returned AutonomousDatabaseInBackupCollection instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousDatabaseInBackupCollection + getAutonomousDatabaseInBackupCollection() { + return autonomousDatabaseInBackupCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "autonomousDatabaseInBackupCollection" + }) + private ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.database.model.AutonomousDatabaseInBackupCollection + autonomousDatabaseInBackupCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.autonomousDatabaseInBackupCollection = autonomousDatabaseInBackupCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 there are additional items still to get. Include this value as the {@code page} parameter for the subsequent GET request. For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then there are additional items still to get. Include this value as the {@code page} parameter for the subsequent GET request. For information about pagination, see [List Pagination](https://docs.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 AutonomousDatabaseInBackupCollection instance. + */ + private com.oracle.bmc.database.model.AutonomousDatabaseInBackupCollection + autonomousDatabaseInBackupCollection; + + /** + * The returned AutonomousDatabaseInBackupCollection instance. + * @param autonomousDatabaseInBackupCollection the value to set + * @return this builder + */ + public Builder autonomousDatabaseInBackupCollection( + com.oracle.bmc.database.model.AutonomousDatabaseInBackupCollection + autonomousDatabaseInBackupCollection) { + this.autonomousDatabaseInBackupCollection = autonomousDatabaseInBackupCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + autonomousDatabaseInBackupCollection(o.getAutonomousDatabaseInBackupCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse build() { + return new ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + autonomousDatabaseInBackupCollection); + } + } + + /** + * 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(",autonomousDatabaseInBackupCollection=") + .append(String.valueOf(autonomousDatabaseInBackupCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse)) { + return false; + } + + ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse other = + (ListAutonomousDatabasesInAutonomousContainerDatabaseBackupResponse) 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.autonomousDatabaseInBackupCollection, + other.autonomousDatabaseInBackupCollection); + } + + @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.autonomousDatabaseInBackupCollection == null + ? 43 + : this.autonomousDatabaseInBackupCollection.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/pom.xml b/bmc-databasemanagement/pom.xml index d5a6ff6764..91bf739293 100644 --- a/bmc-databasemanagement/pom.xml +++ b/bmc-databasemanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-databasemanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-databasemigration/pom.xml b/bmc-databasemigration/pom.xml index 5fc7ac6507..91bbeacc62 100644 --- a/bmc-databasemigration/pom.xml +++ b/bmc-databasemigration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-databasemigration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-databasetools/pom.xml b/bmc-databasetools/pom.xml index f42894fa41..14895c9875 100644 --- a/bmc-databasetools/pom.xml +++ b/bmc-databasetools/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-databasetools @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-databasetoolsruntime/pom.xml b/bmc-databasetoolsruntime/pom.xml index ff97edc3f5..4cff82e3a9 100644 --- a/bmc-databasetoolsruntime/pom.xml +++ b/bmc-databasetoolsruntime/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-databasetoolsruntime @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-datacatalog/pom.xml b/bmc-datacatalog/pom.xml index ddc82b7a4f..efb8d46bb7 100644 --- a/bmc-datacatalog/pom.xml +++ b/bmc-datacatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datacatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-datacc/pom.xml b/bmc-datacc/pom.xml index 5f71f9bbe7..1ee5028993 100644 --- a/bmc-datacc/pom.xml +++ b/bmc-datacc/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datacc @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-dataflow/pom.xml b/bmc-dataflow/pom.xml index 5486e58dd1..6a14a637ec 100644 --- a/bmc-dataflow/pom.xml +++ b/bmc-dataflow/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dataflow @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-dataintegration/pom.xml b/bmc-dataintegration/pom.xml index e57ae593e5..d193338a7f 100644 --- a/bmc-dataintegration/pom.xml +++ b/bmc-dataintegration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dataintegration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-datalabelingservice/pom.xml b/bmc-datalabelingservice/pom.xml index 153f414c90..a85faf1d0c 100644 --- a/bmc-datalabelingservice/pom.xml +++ b/bmc-datalabelingservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datalabelingservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-datalabelingservicedataplane/pom.xml b/bmc-datalabelingservicedataplane/pom.xml index e3348794cc..9611e60699 100644 --- a/bmc-datalabelingservicedataplane/pom.xml +++ b/bmc-datalabelingservicedataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datalabelingservicedataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-datasafe/pom.xml b/bmc-datasafe/pom.xml index d1cd23fd7e..94c3d5e699 100644 --- a/bmc-datasafe/pom.xml +++ b/bmc-datasafe/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datasafe @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-datascience/pom.xml b/bmc-datascience/pom.xml index 39b6e9cbd5..5e2cc2ab28 100644 --- a/bmc-datascience/pom.xml +++ b/bmc-datascience/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-datascience @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-dblm/pom.xml b/bmc-dblm/pom.xml index f86731d8f0..5604665dbd 100644 --- a/bmc-dblm/pom.xml +++ b/bmc-dblm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dblm @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-dbmulticloud/pom.xml b/bmc-dbmulticloud/pom.xml index 26207151c5..5a23d7cc8d 100644 --- a/bmc-dbmulticloud/pom.xml +++ b/bmc-dbmulticloud/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dbmulticloud @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-ddfs/pom.xml b/bmc-ddfs/pom.xml new file mode 100644 index 0000000000..02b2ec77df --- /dev/null +++ b/bmc-ddfs/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.97.0 + ../pom.xml + + oci-java-sdk-ddfs + Oracle Cloud Infrastructure SDK - Ddfs + This project contains the SDK used for Oracle Cloud Infrastructure Ddfs + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.97.0 + + + \ No newline at end of file diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/Instance.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/Instance.java new file mode 100644 index 0000000000..b1112a1152 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/Instance.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; + +/** + * Use the Device Data FHIR Service API to manage DDFS instances. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public interface Instance 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); + + /** + * Cancels 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 CancelWorkRequest API. + */ + CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request); + + /** + * Moves an Instance into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @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 ChangeInstanceCompartment API. + */ + ChangeInstanceCompartmentResponse changeInstanceCompartment( + ChangeInstanceCompartmentRequest request); + + /** + * Creates an Instance. + * + * @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 CreateInstance API. + */ + CreateInstanceResponse createInstance(CreateInstanceRequest request); + + /** + * Deletes an Instance. + * @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 DeleteInstance API. + */ + DeleteInstanceResponse deleteInstance(DeleteInstanceRequest request); + + /** + * Gets information about an Instance. + * @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 GetInstance API. + */ + GetInstanceResponse getInstance(GetInstanceRequest 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 GetWorkRequest API. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + + /** + * Gets a list of Instances. + * + * @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 ListInstances API. + */ + ListInstancesResponse listInstances(ListInstancesRequest 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 ListWorkRequestErrors API. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest 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 ListWorkRequestLogs API. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest 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 ListWorkRequests API. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * Updates an Instance. + * @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 UpdateInstance API. + */ + UpdateInstanceResponse updateInstance(UpdateInstanceRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + InstanceWaiters 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. + */ + InstancePaginators getPaginators(); +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsync.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsync.java new file mode 100644 index 0000000000..7b87a07571 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsync.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; + +/** + * Use the Device Data FHIR Service API to manage DDFS instances. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public interface InstanceAsync 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); + + /** + * Cancels 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 cancelWorkRequest( + CancelWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler); + + /** + * Moves an Instance into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @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 changeInstanceCompartment( + ChangeInstanceCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeInstanceCompartmentRequest, ChangeInstanceCompartmentResponse> + handler); + + /** + * Creates an Instance. + * + * + * @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 createInstance( + CreateInstanceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes an Instance. + * + * @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 deleteInstance( + DeleteInstanceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets information about an Instance. + * + * @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 getInstance( + GetInstanceRequest 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 getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a list of Instances. + * + * + * @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 listInstances( + ListInstancesRequest 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 listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + 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 listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + 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 listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates an Instance. + * + * @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 updateInstance( + UpdateInstanceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsyncClient.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsyncClient.java new file mode 100644 index 0000000000..e4b4de185a --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceAsyncClient.java @@ -0,0 +1,957 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.internal.http.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for Instance 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class InstanceAsyncClient implements InstanceAsync { + /** + * Service instance for Instance. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(InstanceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://ddfs.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(InstanceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public InstanceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public InstanceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public InstanceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public InstanceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public InstanceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public InstanceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public InstanceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public InstanceAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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); + 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 InstanceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new InstanceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future cancelWorkRequest( + CancelWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler) { + LOG.trace("Called async cancelWorkRequest"); + final CancelWorkRequestRequest interceptedRequest = + CancelWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "CancelWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CancelWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CancelWorkRequestRequest, CancelWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future changeInstanceCompartment( + ChangeInstanceCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeInstanceCompartmentRequest, ChangeInstanceCompartmentResponse> + handler) { + LOG.trace("Called async changeInstanceCompartment"); + final ChangeInstanceCompartmentRequest interceptedRequest = + ChangeInstanceCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeInstanceCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ChangeInstanceCompartment", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeInstanceCompartmentResponse> + transformer = + ChangeInstanceCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeInstanceCompartmentRequest, ChangeInstanceCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeInstanceCompartmentRequest, + ChangeInstanceCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeInstanceCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeInstanceCompartmentRequest, ChangeInstanceCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createInstance( + CreateInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateInstanceRequest, CreateInstanceResponse> + handler) { + LOG.trace("Called async createInstance"); + final CreateInstanceRequest interceptedRequest = + CreateInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateInstanceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "CreateInstance", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CreateInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateInstanceRequest, CreateInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateInstanceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateInstanceRequest, CreateInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteInstance( + DeleteInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteInstanceRequest, DeleteInstanceResponse> + handler) { + LOG.trace("Called async deleteInstance"); + final DeleteInstanceRequest interceptedRequest = + DeleteInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteInstanceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "DeleteInstance", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + DeleteInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteInstanceRequest, DeleteInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteInstanceRequest, DeleteInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getInstance( + GetInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getInstance"); + final GetInstanceRequest interceptedRequest = + GetInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetInstanceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "GetInstance", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetInstanceRequest, GetInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetInstanceRequest, GetInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> + handler) { + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "GetWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestRequest, GetWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listInstances( + ListInstancesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listInstances"); + final ListInstancesRequest interceptedRequest = + ListInstancesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInstancesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListInstances", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListInstancesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListInstancesRequest, ListInstancesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListInstancesRequest, ListInstancesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequests", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateInstance( + UpdateInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceRequest, UpdateInstanceResponse> + handler) { + LOG.trace("Called async updateInstance"); + final UpdateInstanceRequest interceptedRequest = + UpdateInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateInstanceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "UpdateInstance", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + UpdateInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceRequest, UpdateInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateInstanceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateInstanceRequest, UpdateInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceClient.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceClient.java new file mode 100644 index 0000000000..86a17d4849 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceClient.java @@ -0,0 +1,950 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.internal.http.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class InstanceClient implements Instance { + /** + * Service instance for Instance. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(InstanceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://ddfs.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(InstanceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final InstanceWaiters waiters; + + private final InstancePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public InstanceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public InstanceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public InstanceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public InstanceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public InstanceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public InstanceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public InstanceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public InstanceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected InstanceClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("Instance-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new InstanceWaiters(executorService, this); + + this.paginators = new InstancePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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); + 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 InstanceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new InstanceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request) { + LOG.trace("Called cancelWorkRequest"); + final CancelWorkRequestRequest interceptedRequest = + CancelWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "CancelWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + CancelWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeInstanceCompartmentResponse changeInstanceCompartment( + ChangeInstanceCompartmentRequest request) { + LOG.trace("Called changeInstanceCompartment"); + final ChangeInstanceCompartmentRequest interceptedRequest = + ChangeInstanceCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeInstanceCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ChangeInstanceCompartment", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ChangeInstanceCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeInstanceCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateInstanceResponse createInstance(CreateInstanceRequest request) { + LOG.trace("Called createInstance"); + final CreateInstanceRequest interceptedRequest = + CreateInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateInstanceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "CreateInstance", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + CreateInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateInstanceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteInstanceResponse deleteInstance(DeleteInstanceRequest request) { + LOG.trace("Called deleteInstance"); + final DeleteInstanceRequest interceptedRequest = + DeleteInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteInstanceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "DeleteInstance", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + DeleteInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetInstanceResponse getInstance(GetInstanceRequest request) { + LOG.trace("Called getInstance"); + final GetInstanceRequest interceptedRequest = + GetInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetInstanceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "GetInstance", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "GetWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListInstancesResponse listInstances(ListInstancesRequest request) { + LOG.trace("Called listInstances"); + final ListInstancesRequest interceptedRequest = + ListInstancesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInstancesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListInstances", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + ListInstancesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "ListWorkRequests", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateInstanceResponse updateInstance(UpdateInstanceRequest request) { + LOG.trace("Called updateInstance"); + final UpdateInstanceRequest interceptedRequest = + UpdateInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateInstanceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Instance", "UpdateInstance", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + UpdateInstanceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateInstanceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public InstanceWaiters getWaiters() { + return waiters; + } + + @Override + public InstancePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstancePaginators.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstancePaginators.java new file mode 100644 index 0000000000..bb9d926a54 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstancePaginators.java @@ -0,0 +1,485 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of Instance 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class InstancePaginators { + private final Instance client; + + public InstancePaginators(Instance client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listInstances 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 listInstancesResponseIterator( + final ListInstancesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListInstancesRequest.Builder, ListInstancesRequest, ListInstancesResponse>( + new java.util.function.Supplier() { + @Override + public ListInstancesRequest.Builder get() { + return ListInstancesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInstancesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstancesRequest.Builder>, + ListInstancesRequest>() { + @Override + public ListInstancesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstancesRequest.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 ListInstancesResponse apply(ListInstancesRequest request) { + return client.listInstances(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.ddfs.model.InstanceSummary} objects + * contained in responses from the listInstances 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.ddfs.model.InstanceSummary} objects + * contained in responses received from the service. + */ + public Iterable listInstancesRecordIterator( + final ListInstancesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListInstancesRequest.Builder, ListInstancesRequest, ListInstancesResponse, + com.oracle.bmc.ddfs.model.InstanceSummary>( + new java.util.function.Supplier() { + @Override + public ListInstancesRequest.Builder get() { + return ListInstancesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInstancesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstancesRequest.Builder>, + ListInstancesRequest>() { + @Override + public ListInstancesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstancesRequest.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 ListInstancesResponse apply(ListInstancesRequest request) { + return client.listInstances(request); + } + }, + new java.util.function.Function< + ListInstancesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListInstancesResponse response) { + return response.getInstanceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors 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 listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.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< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.ddfs.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors 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.ddfs.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable listWorkRequestErrorsRecordIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, com.oracle.bmc.ddfs.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.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< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs 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 listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.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< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.ddfs.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs 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.ddfs.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, com.oracle.bmc.ddfs.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.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< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests 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 listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.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< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.ddfs.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests 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.ddfs.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable listWorkRequestsRecordIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.ddfs.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.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< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new java.util.function.Function< + ListWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceWaiters.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceWaiters.java new file mode 100644 index 0000000000..3413be38b9 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/InstanceWaiters.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of Instance. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class InstanceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final Instance client; + + public InstanceWaiters(java.util.concurrent.ExecutorService executorService, Instance 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 forInstance( + GetInstanceRequest request, + com.oracle.bmc.ddfs.model.Instance.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 forInstance( + 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 forInstance( + GetInstanceRequest request, + com.oracle.bmc.ddfs.model.Instance.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 forInstance( + 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 forInstance( + GetInstanceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.ddfs.model.Instance.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 forInstance( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Instance. + private com.oracle.bmc.waiter.Waiter forInstance( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetInstanceRequest request, + final com.oracle.bmc.ddfs.model.Instance.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() { + @Override + public GetInstanceResponse apply(GetInstanceRequest request) { + return client.getInstance(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetInstanceResponse response) { + return targetStatesSet.contains( + response.getInstance().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.ddfs.model.Instance.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 + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(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 + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/SdkClientsMetadata.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/SdkClientsMetadata.java new file mode 100644 index 0000000000..b6046239d8 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/SdkClientsMetadata.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@SdkClients({InstanceAsyncClient.class, InstanceClient.class}) +public final class SdkClientsMetadata {} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CancelWorkRequestConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CancelWorkRequestConverter.java new file mode 100644 index 0000000000..442d4e07db --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CancelWorkRequestConverter.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CancelWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CancelWorkRequestConverter.class); + + public static com.oracle.bmc.ddfs.requests.CancelWorkRequestRequest interceptRequest( + com.oracle.bmc.ddfs.requests.CancelWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.CancelWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse.Builder + builder = + com.oracle.bmc.ddfs.responses + .CancelWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.CancelWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ChangeInstanceCompartmentConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ChangeInstanceCompartmentConverter.java new file mode 100644 index 0000000000..855c502370 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ChangeInstanceCompartmentConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ChangeInstanceCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeInstanceCompartmentConverter.class); + + public static com.oracle.bmc.ddfs.requests.ChangeInstanceCompartmentRequest interceptRequest( + com.oracle.bmc.ddfs.requests.ChangeInstanceCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.ChangeInstanceCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getInstanceId(), "instanceId must not be blank"); + Validate.notNull( + request.getChangeInstanceCompartmentDetails(), + "changeInstanceCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("instances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse + .Builder + builder = + com.oracle.bmc.ddfs.responses + .ChangeInstanceCompartmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.ChangeInstanceCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CreateInstanceConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CreateInstanceConverter.java new file mode 100644 index 0000000000..8ac14ef0dc --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/CreateInstanceConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CreateInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateInstanceConverter.class); + + public static com.oracle.bmc.ddfs.requests.CreateInstanceRequest interceptRequest( + com.oracle.bmc.ddfs.requests.CreateInstanceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.CreateInstanceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateInstanceDetails(), "createInstanceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260831").path("instances"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.CreateInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.CreateInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CreateInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.CreateInstanceResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.CreateInstanceResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.CreateInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.Instance>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.Instance.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.Instance.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.Instance> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.CreateInstanceResponse.Builder + builder = + com.oracle.bmc.ddfs.responses.CreateInstanceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.instance(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.CreateInstanceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/DeleteInstanceConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/DeleteInstanceConverter.java new file mode 100644 index 0000000000..7ea607a893 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/DeleteInstanceConverter.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class DeleteInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteInstanceConverter.class); + + public static com.oracle.bmc.ddfs.requests.DeleteInstanceRequest interceptRequest( + com.oracle.bmc.ddfs.requests.DeleteInstanceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.DeleteInstanceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getInstanceId(), "instanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("instances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.DeleteInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.DeleteInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.DeleteInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.DeleteInstanceResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.DeleteInstanceResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.DeleteInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.DeleteInstanceResponse.Builder + builder = + com.oracle.bmc.ddfs.responses.DeleteInstanceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.DeleteInstanceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetInstanceConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetInstanceConverter.java new file mode 100644 index 0000000000..be7ae8c16b --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetInstanceConverter.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetInstanceConverter.class); + + public static com.oracle.bmc.ddfs.requests.GetInstanceRequest interceptRequest( + com.oracle.bmc.ddfs.requests.GetInstanceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.GetInstanceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getInstanceId(), "instanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("instances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.GetInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.GetInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.GetInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.GetInstanceResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.GetInstanceResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.GetInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.Instance>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.Instance.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.Instance.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.Instance> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.GetInstanceResponse.Builder builder = + com.oracle.bmc.ddfs.responses.GetInstanceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.instance(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.GetInstanceResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetWorkRequestConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetWorkRequestConverter.java new file mode 100644 index 0000000000..cd4b617742 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestConverter.class); + + public static com.oracle.bmc.ddfs.requests.GetWorkRequestRequest interceptRequest( + com.oracle.bmc.ddfs.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.GetWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.WorkRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.WorkRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.GetWorkRequestResponse.Builder + builder = + com.oracle.bmc.ddfs.responses.GetWorkRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.ddfs.responses.GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListInstancesConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListInstancesConverter.java new file mode 100644 index 0000000000..64e4427f9e --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListInstancesConverter.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListInstancesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListInstancesConverter.class); + + public static com.oracle.bmc.ddfs.requests.ListInstancesRequest interceptRequest( + com.oracle.bmc.ddfs.requests.ListInstancesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.ListInstancesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260831").path("instances"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.ListInstancesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.ListInstancesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListInstancesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListInstancesResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.ListInstancesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.ListInstancesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .InstanceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.InstanceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model.InstanceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model.InstanceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.ListInstancesResponse.Builder + builder = + com.oracle.bmc.ddfs.responses.ListInstancesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.instanceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.ListInstancesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestErrorsConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 0000000000..a831364ed6 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.ddfs.requests.ListWorkRequestErrorsRequest interceptRequest( + com.oracle.bmc.ddfs.requests.ListWorkRequestErrorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse.Builder + builder = + com.oracle.bmc.ddfs.responses + .ListWorkRequestErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestLogsConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 0000000000..9902e84229 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestLogsConverter.class); + + public static com.oracle.bmc.ddfs.requests.ListWorkRequestLogsRequest interceptRequest( + com.oracle.bmc.ddfs.requests.ListWorkRequestLogsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.ddfs.responses + .ListWorkRequestLogsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestsConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 0000000000..e6e1edf100 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestsConverter.class); + + public static com.oracle.bmc.ddfs.requests.ListWorkRequestsRequest interceptRequest( + com.oracle.bmc.ddfs.requests.ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260831").path("workRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.ddfs.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.ddfs.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse.Builder + builder = + com.oracle.bmc.ddfs.responses + .ListWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/UpdateInstanceConverter.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/UpdateInstanceConverter.java new file mode 100644 index 0000000000..333ada0781 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/internal/http/UpdateInstanceConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.ddfs.model.*; +import com.oracle.bmc.ddfs.requests.*; +import com.oracle.bmc.ddfs.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class UpdateInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateInstanceConverter.class); + + public static com.oracle.bmc.ddfs.requests.UpdateInstanceRequest interceptRequest( + com.oracle.bmc.ddfs.requests.UpdateInstanceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.ddfs.requests.UpdateInstanceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getInstanceId(), "instanceId must not be blank"); + Validate.notNull(request.getUpdateInstanceDetails(), "updateInstanceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260831") + .path("instances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.UpdateInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.ddfs.responses.UpdateInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.UpdateInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.ddfs.responses.UpdateInstanceResponse>() { + @Override + public com.oracle.bmc.ddfs.responses.UpdateInstanceResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.ddfs.responses.UpdateInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.ddfs.responses.UpdateInstanceResponse.Builder + builder = + com.oracle.bmc.ddfs.responses.UpdateInstanceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.ddfs.responses.UpdateInstanceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ActionType.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ActionType.java new file mode 100644 index 0000000000..aa46e29c1b --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public enum ActionType { + 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ChangeInstanceCompartmentDetails.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ChangeInstanceCompartmentDetails.java new file mode 100644 index 0000000000..9251bf3ec4 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/ChangeInstanceCompartmentDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The configuration details for the move 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeInstanceCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeInstanceCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeInstanceCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the Instance to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the Instance to. + * + * @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 ChangeInstanceCompartmentDetails build() { + ChangeInstanceCompartmentDetails model = + new ChangeInstanceCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeInstanceCompartmentDetails 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the Instance to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the Instance to. + * + * @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("ChangeInstanceCompartmentDetails("); + 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 ChangeInstanceCompartmentDetails)) { + return false; + } + + ChangeInstanceCompartmentDetails other = (ChangeInstanceCompartmentDetails) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/CreateInstanceDetails.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/CreateInstanceDetails.java new file mode 100644 index 0000000000..a9a85f6eb2 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/CreateInstanceDetails.java @@ -0,0 +1,356 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The data to create an Instance. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateInstanceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateInstanceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "idcsUrl", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateInstanceDetails( + String displayName, + String idcsUrl, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.idcsUrl = idcsUrl; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @param idcsUrl the value to set + * @return this builder + **/ + public Builder idcsUrl(String idcsUrl) { + this.idcsUrl = idcsUrl; + this.__explicitlySet__.add("idcsUrl"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the Instance in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the Instance in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + 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.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.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.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.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 CreateInstanceDetails build() { + CreateInstanceDetails model = + new CreateInstanceDetails( + this.displayName, + this.idcsUrl, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateInstanceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("idcsUrl")) { + this.idcsUrl(model.getIdcsUrl()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + 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); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private final String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @return the value + **/ + public String getIdcsUrl() { + return idcsUrl; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the Instance in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the Instance in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * 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.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.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.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.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("CreateInstanceDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", idcsUrl=").append(String.valueOf(this.idcsUrl)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + 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 CreateInstanceDetails)) { + return false; + } + + CreateInstanceDetails other = (CreateInstanceDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.idcsUrl, other.idcsUrl) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.idcsUrl == null ? 43 : this.idcsUrl.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/Instance.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/Instance.java new file mode 100644 index 0000000000..9d630e3869 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/Instance.java @@ -0,0 +1,790 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * A Device Data FHIR Service instance. + *

+ * 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.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Instance.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Instance extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "idcsUrl", + "publicIp", + "fhirServiceEndpoint", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public Instance( + String id, + String displayName, + String compartmentId, + String idcsUrl, + String publicIp, + String fhirServiceEndpoint, + 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.displayName = displayName; + this.compartmentId = compartmentId; + this.idcsUrl = idcsUrl; + this.publicIp = publicIp; + this.fhirServiceEndpoint = fhirServiceEndpoint; + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.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; + } + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @param idcsUrl the value to set + * @return this builder + **/ + public Builder idcsUrl(String idcsUrl) { + this.idcsUrl = idcsUrl; + this.__explicitlySet__.add("idcsUrl"); + return this; + } + /** + * The public IP address for the instance's FHIR service endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicIp") + private String publicIp; + + /** + * The public IP address for the instance's FHIR service endpoint. + * @param publicIp the value to set + * @return this builder + **/ + public Builder publicIp(String publicIp) { + this.publicIp = publicIp; + this.__explicitlySet__.add("publicIp"); + return this; + } + /** + * The HTTPS endpoint for the instance's Fast Healthcare Interoperability Resources (FHIR) service. + *

+ * Example: {@code https://example.ddfs.oraclecloud.com/api/fhir} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fhirServiceEndpoint") + private String fhirServiceEndpoint; + + /** + * The HTTPS endpoint for the instance's Fast Healthcare Interoperability Resources (FHIR) service. + *

+ * Example: {@code https://example.ddfs.oraclecloud.com/api/fhir} + * + * @param fhirServiceEndpoint the value to set + * @return this builder + **/ + public Builder fhirServiceEndpoint(String fhirServiceEndpoint) { + this.fhirServiceEndpoint = fhirServiceEndpoint; + this.__explicitlySet__.add("fhirServiceEndpoint"); + return this; + } + /** + * The date and time the Instance 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 Instance 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; + } + /** + * The date and time the Instance 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 Instance 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 the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Instance. + * @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 the Instance 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 Instance 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.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.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.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.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": {"example-key": "example-value"}}} + * + **/ + @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": {"example-key": "example-value"}}} + * + * @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 Instance build() { + Instance model = + new Instance( + this.id, + this.displayName, + this.compartmentId, + this.idcsUrl, + this.publicIp, + this.fhirServiceEndpoint, + 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(Instance model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("idcsUrl")) { + this.idcsUrl(model.getIdcsUrl()); + } + if (model.wasPropertyExplicitlySet("publicIp")) { + this.publicIp(model.getPublicIp()); + } + if (model.wasPropertyExplicitlySet("fhirServiceEndpoint")) { + this.fhirServiceEndpoint(model.getFhirServiceEndpoint()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private final String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @return the value + **/ + public String getIdcsUrl() { + return idcsUrl; + } + + /** + * The public IP address for the instance's FHIR service endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicIp") + private final String publicIp; + + /** + * The public IP address for the instance's FHIR service endpoint. + * @return the value + **/ + public String getPublicIp() { + return publicIp; + } + + /** + * The HTTPS endpoint for the instance's Fast Healthcare Interoperability Resources (FHIR) service. + *

+ * Example: {@code https://example.ddfs.oraclecloud.com/api/fhir} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fhirServiceEndpoint") + private final String fhirServiceEndpoint; + + /** + * The HTTPS endpoint for the instance's Fast Healthcare Interoperability Resources (FHIR) service. + *

+ * Example: {@code https://example.ddfs.oraclecloud.com/api/fhir} + * + * @return the value + **/ + public String getFhirServiceEndpoint() { + return fhirServiceEndpoint; + } + + /** + * The date and time the Instance 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 Instance 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; + } + + /** + * The date and time the Instance 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 Instance 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 the Instance. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + 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 the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Instance. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the Instance 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 Instance 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.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.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.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.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": {"example-key": "example-value"}}} + * + **/ + @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": {"example-key": "example-value"}}} + * + * @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("Instance("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", idcsUrl=").append(String.valueOf(this.idcsUrl)); + sb.append(", publicIp=").append(String.valueOf(this.publicIp)); + sb.append(", fhirServiceEndpoint=").append(String.valueOf(this.fhirServiceEndpoint)); + 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 Instance)) { + return false; + } + + Instance other = (Instance) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.idcsUrl, other.idcsUrl) + && java.util.Objects.equals(this.publicIp, other.publicIp) + && java.util.Objects.equals(this.fhirServiceEndpoint, other.fhirServiceEndpoint) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.idcsUrl == null ? 43 : this.idcsUrl.hashCode()); + result = (result * PRIME) + (this.publicIp == null ? 43 : this.publicIp.hashCode()); + result = + (result * PRIME) + + (this.fhirServiceEndpoint == null + ? 43 + : this.fhirServiceEndpoint.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceCollection.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceCollection.java new file mode 100644 index 0000000000..891fb1a094 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * Results of an instance search. Contains both InstanceSummary 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public InstanceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of instances. + * @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 InstanceCollection build() { + InstanceCollection model = new InstanceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceCollection 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 instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of instances. + * @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("InstanceCollection("); + 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 InstanceCollection)) { + return false; + } + + InstanceCollection other = (InstanceCollection) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceSummary.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceSummary.java new file mode 100644 index 0000000000..97f756012a --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/InstanceSummary.java @@ -0,0 +1,637 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * Summary information about an Instance. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = InstanceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "idcsUrl", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public InstanceSummary( + String id, + String displayName, + String compartmentId, + String idcsUrl, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Instance.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.idcsUrl = idcsUrl; + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.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; + } + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @param idcsUrl the value to set + * @return this builder + **/ + public Builder idcsUrl(String idcsUrl) { + this.idcsUrl = idcsUrl; + this.__explicitlySet__.add("idcsUrl"); + return this; + } + /** + * The date and time the Instance 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 Instance 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; + } + /** + * The date and time the Instance 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 Instance 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 the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Instance.LifecycleState lifecycleState; + + /** + * The current state of the Instance. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Instance.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the Instance 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 Instance 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.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.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.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.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": {"example-key": "example-value"}}} + * + **/ + @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": {"example-key": "example-value"}}} + * + * @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 InstanceSummary build() { + InstanceSummary model = + new InstanceSummary( + this.id, + this.displayName, + this.compartmentId, + this.idcsUrl, + 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(InstanceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("idcsUrl")) { + this.idcsUrl(model.getIdcsUrl()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private final String idcsUrl; + + /** + * The Oracle Identity Cloud Service (IDCS) URL for the identity domain associated with the instance. + * Use the IDCS tenant URL from your identity domain configuration. + *

+ * Example: {@code https://idcs-1234567890.identity.oraclecloud.com} + * + * @return the value + **/ + public String getIdcsUrl() { + return idcsUrl; + } + + /** + * The date and time the Instance 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 Instance 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; + } + + /** + * The date and time the Instance 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 Instance 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 the Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Instance.LifecycleState lifecycleState; + + /** + * The current state of the Instance. + * @return the value + **/ + public Instance.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the Instance 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 Instance 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.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.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.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.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": {"example-key": "example-value"}}} + * + **/ + @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": {"example-key": "example-value"}}} + * + * @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("InstanceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", idcsUrl=").append(String.valueOf(this.idcsUrl)); + 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 InstanceSummary)) { + return false; + } + + InstanceSummary other = (InstanceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.idcsUrl, other.idcsUrl) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.idcsUrl == null ? 43 : this.idcsUrl.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationStatus.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationStatus.java new file mode 100644 index 0000000000..2bb918482d --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The status of the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Cancelling("CANCELLING"), + Cancelled("CANCELLED"), + + /** + * 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(OperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationStatus v : OperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationType.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationType.java new file mode 100644 index 0000000000..3814704397 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/OperationType.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The asynchronous operation tracked by the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public enum OperationType { + CreateInstance("CREATE_INSTANCE"), + UpdateInstance("UPDATE_INSTANCE"), + DeleteInstance("DELETE_INSTANCE"), + MoveInstance("MOVE_INSTANCE"), + + /** + * 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/SortOrder.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/SortOrder.java new file mode 100644 index 0000000000..6a7b266a1b --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/SortOrder.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code displayName} + * sort order is case sensitive. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public enum SortOrder { + 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/UpdateInstanceDetails.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/UpdateInstanceDetails.java new file mode 100644 index 0000000000..392caf9bb0 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/UpdateInstanceDetails.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * The data to update an Instance. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateInstanceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateInstanceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "freeformTags", "definedTags"}) + public UpdateInstanceDetails( + String displayName, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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.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.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.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.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 UpdateInstanceDetails build() { + UpdateInstanceDetails model = + new UpdateInstanceDetails( + this.displayName, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateInstanceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + 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); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * 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.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.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.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.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("UpdateInstanceDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + 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 UpdateInstanceDetails)) { + return false; + } + + UpdateInstanceDetails other = (UpdateInstanceDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && 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.displayName == null ? 43 : this.displayName.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequest.java new file mode 100644 index 0000000000..a1800f34a7 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequest.java @@ -0,0 +1,551 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequest( + OperationType operationType, + OperationStatus 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 OperationStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.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.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.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.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 OperationStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.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.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestError.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestError.java new file mode 100644 index 0000000000..b8b575e40a --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestError.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.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.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.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.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.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestErrorCollection.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestErrorCollection.java new file mode 100644 index 0000000000..14d9a56930 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntry.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntry.java new file mode 100644 index 0000000000..afa7d2452c --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntry.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntryCollection.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntryCollection.java new file mode 100644 index 0000000000..012b0b44fe --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResource.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResource.java new file mode 100644 index 0000000000..95cee4169c --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.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.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.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.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.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResourceMetadataKey.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 0000000000..a30f8b9fc9 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.model; + +/** + * Possible metadata keys for work request resource metadata. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public enum WorkRequestResourceMetadataKey { + 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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummary.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummary.java new file mode 100644 index 0000000000..f5a14e008c --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummary.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequestSummary( + OperationType operationType, + OperationStatus 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 OperationStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.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.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.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.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 OperationStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.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.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-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummaryCollection.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummaryCollection.java new file mode 100644 index 0000000000..4092af94ec --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CancelWorkRequestRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CancelWorkRequestRequest.java new file mode 100644 index 0000000000..8d4008af58 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CancelWorkRequestRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use CancelWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CancelWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.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; + } + + /** + * 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.util.internal.Consumer + 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(CancelWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelWorkRequestRequest + */ + public CancelWorkRequestRequest build() { + CancelWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CancelWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CancelWorkRequestRequest + */ + public CancelWorkRequestRequest buildWithoutInvocationCallback() { + CancelWorkRequestRequest request = new CancelWorkRequestRequest(); + request.workRequestId = workRequestId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new CancelWorkRequestRequest(workRequestId, 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() + .workRequestId(workRequestId) + .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(",workRequestId=").append(String.valueOf(this.workRequestId)); + 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 CancelWorkRequestRequest)) { + return false; + } + + CancelWorkRequestRequest other = (CancelWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && 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.workRequestId == null ? 43 : this.workRequestId.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ChangeInstanceCompartmentRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ChangeInstanceCompartmentRequest.java new file mode 100644 index 0000000000..e243aaf737 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ChangeInstanceCompartmentRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use ChangeInstanceCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ChangeInstanceCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + public String getInstanceId() { + return instanceId; + } + /** + * The compartment move details. + */ + private com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails + changeInstanceCompartmentDetails; + + /** + * The compartment move details. + */ + public com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails + getChangeInstanceCompartmentDetails() { + return changeInstanceCompartmentDetails; + } + /** + * 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.ddfs.model.ChangeInstanceCompartmentDetails getBody$() { + return changeInstanceCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeInstanceCompartmentRequest, + com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param instanceId the value to set + * @return this builder instance + */ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + return this; + } + + /** + * The compartment move details. + */ + private com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails + changeInstanceCompartmentDetails = null; + + /** + * The compartment move details. + * @param changeInstanceCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeInstanceCompartmentDetails( + com.oracle.bmc.ddfs.model.ChangeInstanceCompartmentDetails + changeInstanceCompartmentDetails) { + this.changeInstanceCompartmentDetails = changeInstanceCompartmentDetails; + 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.util.internal.Consumer + 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(ChangeInstanceCompartmentRequest o) { + instanceId(o.getInstanceId()); + changeInstanceCompartmentDetails(o.getChangeInstanceCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeInstanceCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeInstanceCompartmentRequest + */ + public ChangeInstanceCompartmentRequest build() { + ChangeInstanceCompartmentRequest 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.ddfs.model.ChangeInstanceCompartmentDetails body) { + changeInstanceCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeInstanceCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeInstanceCompartmentRequest + */ + public ChangeInstanceCompartmentRequest buildWithoutInvocationCallback() { + ChangeInstanceCompartmentRequest request = new ChangeInstanceCompartmentRequest(); + request.instanceId = instanceId; + request.changeInstanceCompartmentDetails = changeInstanceCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeInstanceCompartmentRequest(instanceId, changeInstanceCompartmentDetails, 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() + .instanceId(instanceId) + .changeInstanceCompartmentDetails(changeInstanceCompartmentDetails) + .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(",instanceId=").append(String.valueOf(this.instanceId)); + sb.append(",changeInstanceCompartmentDetails=") + .append(String.valueOf(this.changeInstanceCompartmentDetails)); + 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 ChangeInstanceCompartmentRequest)) { + return false; + } + + ChangeInstanceCompartmentRequest other = (ChangeInstanceCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals( + this.changeInstanceCompartmentDetails, + other.changeInstanceCompartmentDetails) + && 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.instanceId == null ? 43 : this.instanceId.hashCode()); + result = + (result * PRIME) + + (this.changeInstanceCompartmentDetails == null + ? 43 + : this.changeInstanceCompartmentDetails.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CreateInstanceRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CreateInstanceRequest.java new file mode 100644 index 0000000000..51c144ded0 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/CreateInstanceRequest.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use CreateInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CreateInstanceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.ddfs.model.CreateInstanceDetails> { + + /** + * Details for the new Instance. + */ + private com.oracle.bmc.ddfs.model.CreateInstanceDetails createInstanceDetails; + + /** + * Details for the new Instance. + */ + public com.oracle.bmc.ddfs.model.CreateInstanceDetails getCreateInstanceDetails() { + return createInstanceDetails; + } + /** + * 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.ddfs.model.CreateInstanceDetails getBody$() { + return createInstanceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateInstanceRequest, com.oracle.bmc.ddfs.model.CreateInstanceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Instance. + */ + private com.oracle.bmc.ddfs.model.CreateInstanceDetails createInstanceDetails = null; + + /** + * Details for the new Instance. + * @param createInstanceDetails the value to set + * @return this builder instance + */ + public Builder createInstanceDetails( + com.oracle.bmc.ddfs.model.CreateInstanceDetails createInstanceDetails) { + this.createInstanceDetails = createInstanceDetails; + 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.util.internal.Consumer + 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(CreateInstanceRequest o) { + createInstanceDetails(o.getCreateInstanceDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateInstanceRequest + */ + public CreateInstanceRequest build() { + CreateInstanceRequest 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.ddfs.model.CreateInstanceDetails body) { + createInstanceDetails(body); + return this; + } + + /** + * Build the instance of CreateInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateInstanceRequest + */ + public CreateInstanceRequest buildWithoutInvocationCallback() { + CreateInstanceRequest request = new CreateInstanceRequest(); + request.createInstanceDetails = createInstanceDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateInstanceRequest(createInstanceDetails, 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() + .createInstanceDetails(createInstanceDetails) + .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(",createInstanceDetails=").append(String.valueOf(this.createInstanceDetails)); + 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 CreateInstanceRequest)) { + return false; + } + + CreateInstanceRequest other = (CreateInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createInstanceDetails, other.createInstanceDetails) + && 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.createInstanceDetails == null + ? 43 + : this.createInstanceDetails.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/DeleteInstanceRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/DeleteInstanceRequest.java new file mode 100644 index 0000000000..670a5d87bf --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/DeleteInstanceRequest.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use DeleteInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class DeleteInstanceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + public String getInstanceId() { + return instanceId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteInstanceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param instanceId the value to set + * @return this builder instance + */ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + 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.util.internal.Consumer + 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(DeleteInstanceRequest o) { + instanceId(o.getInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteInstanceRequest + */ + public DeleteInstanceRequest build() { + DeleteInstanceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteInstanceRequest + */ + public DeleteInstanceRequest buildWithoutInvocationCallback() { + DeleteInstanceRequest request = new DeleteInstanceRequest(); + request.instanceId = instanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteInstanceRequest(instanceId, 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().instanceId(instanceId).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(",instanceId=").append(String.valueOf(this.instanceId)); + 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 DeleteInstanceRequest)) { + return false; + } + + DeleteInstanceRequest other = (DeleteInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && 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.instanceId == null ? 43 : this.instanceId.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetInstanceRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetInstanceRequest.java new file mode 100644 index 0000000000..ae544cce70 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetInstanceRequest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use GetInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetInstanceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + public String getInstanceId() { + return instanceId; + } + /** + * 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< + GetInstanceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param instanceId the value to set + * @return this builder instance + */ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + 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.util.internal.Consumer + 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(GetInstanceRequest o) { + instanceId(o.getInstanceId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetInstanceRequest + */ + public GetInstanceRequest build() { + GetInstanceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetInstanceRequest + */ + public GetInstanceRequest buildWithoutInvocationCallback() { + GetInstanceRequest request = new GetInstanceRequest(); + request.instanceId = instanceId; + request.opcRequestId = opcRequestId; + return request; + // new GetInstanceRequest(instanceId, 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().instanceId(instanceId).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(",instanceId=").append(String.valueOf(this.instanceId)); + 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 GetInstanceRequest)) { + return false; + } + + GetInstanceRequest other = (GetInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetWorkRequestRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetWorkRequestRequest.java new file mode 100644 index 0000000000..f4ba466449 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/GetWorkRequestRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.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< + GetWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.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.util.internal.Consumer + 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(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest buildWithoutInvocationCallback() { + GetWorkRequestRequest request = new GetWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestRequest(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 GetWorkRequestRequest)) { + return false; + } + + GetWorkRequestRequest other = (GetWorkRequestRequest) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListInstancesRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListInstancesRequest.java new file mode 100644 index 0000000000..d34e385949 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListInstancesRequest.java @@ -0,0 +1,518 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use ListInstancesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListInstancesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.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.ddfs.model.Instance.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.ddfs.model.Instance.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + 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.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.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.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.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.ddfs.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.ddfs.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 displayName} 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 displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + 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 displayName} 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< + ListInstancesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.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.ddfs.model.Instance.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.ddfs.model.Instance.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String id = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @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.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.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.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.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.ddfs.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.ddfs.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 displayName} 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 displayName} 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.util.internal.Consumer + 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(ListInstancesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + 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 ListInstancesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListInstancesRequest + */ + public ListInstancesRequest build() { + ListInstancesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListInstancesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListInstancesRequest + */ + public ListInstancesRequest buildWithoutInvocationCallback() { + ListInstancesRequest request = new ListInstancesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListInstancesRequest(compartmentId, lifecycleState, displayName, 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) + .displayName(displayName) + .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(",displayName=").append(String.valueOf(this.displayName)); + 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 ListInstancesRequest)) { + return false; + } + + ListInstancesRequest other = (ListInstancesRequest) 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.displayName, other.displayName) + && 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.displayName == null ? 43 : this.displayName.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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestErrorsRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 0000000000..a18e6130f1 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.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.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.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.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.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 timeCreated} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeCreated} is descending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + ; + + 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 timeCreated} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.ddfs.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.ddfs.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.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.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.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.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.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 timeCreated} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeCreated} 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.ddfs.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.ddfs.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.util.internal.Consumer + 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(ListWorkRequestErrorsRequest 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 ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListWorkRequestErrorsRequest request = new ListWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestErrorsRequest(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 ListWorkRequestErrorsRequest)) { + return false; + } + + ListWorkRequestErrorsRequest other = (ListWorkRequestErrorsRequest) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestLogsRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 0000000000..91605f6043 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.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.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.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.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.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 timeCreated} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeCreated} is descending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + ; + + 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 timeCreated} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.ddfs.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.ddfs.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.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.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.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.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.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 timeCreated} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeCreated} 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.ddfs.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.ddfs.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.util.internal.Consumer + 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(ListWorkRequestLogsRequest 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 ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListWorkRequestLogsRequest request = new ListWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestLogsRequest(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 ListWorkRequestLogsRequest)) { + return false; + } + + ListWorkRequestLogsRequest other = (ListWorkRequestLogsRequest) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestsRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestsRequest.java new file mode 100644 index 0000000000..4bf5f8295f --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/ListWorkRequestsRequest.java @@ -0,0 +1,503 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only work requests that match the given status. + */ + private com.oracle.bmc.ddfs.model.OperationStatus status; + + /** + * A filter to return only work requests that match the given status. + */ + public com.oracle.bmc.ddfs.model.OperationStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.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.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.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.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.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.ddfs.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.ddfs.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 { + 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< + ListWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.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 work requests that match the given status. + */ + private com.oracle.bmc.ddfs.model.OperationStatus status = null; + + /** + * A filter to return only work requests that match the given status. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.ddfs.model.OperationStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.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.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.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.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.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.ddfs.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.ddfs.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.util.internal.Consumer + 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(ListWorkRequestsRequest 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 ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest buildWithoutInvocationCallback() { + ListWorkRequestsRequest request = new ListWorkRequestsRequest(); + 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 ListWorkRequestsRequest(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 ListWorkRequestsRequest)) { + return false; + } + + ListWorkRequestsRequest other = (ListWorkRequestsRequest) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/UpdateInstanceRequest.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/UpdateInstanceRequest.java new file mode 100644 index 0000000000..cb22fd3661 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/requests/UpdateInstanceRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.requests; + +import com.oracle.bmc.ddfs.model.*; +/** + * Example: Click here to see how to use UpdateInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class UpdateInstanceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.ddfs.model.UpdateInstanceDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + public String getInstanceId() { + return instanceId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.ddfs.model.UpdateInstanceDetails updateInstanceDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.ddfs.model.UpdateInstanceDetails getUpdateInstanceDetails() { + return updateInstanceDetails; + } + /** + * 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.ddfs.model.UpdateInstanceDetails getBody$() { + return updateInstanceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateInstanceRequest, com.oracle.bmc.ddfs.model.UpdateInstanceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + */ + private String instanceId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Instance. + * @param instanceId the value to set + * @return this builder instance + */ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.ddfs.model.UpdateInstanceDetails updateInstanceDetails = null; + + /** + * The information to be updated. + * @param updateInstanceDetails the value to set + * @return this builder instance + */ + public Builder updateInstanceDetails( + com.oracle.bmc.ddfs.model.UpdateInstanceDetails updateInstanceDetails) { + this.updateInstanceDetails = updateInstanceDetails; + 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.util.internal.Consumer + 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(UpdateInstanceRequest o) { + instanceId(o.getInstanceId()); + updateInstanceDetails(o.getUpdateInstanceDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateInstanceRequest + */ + public UpdateInstanceRequest build() { + UpdateInstanceRequest 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.ddfs.model.UpdateInstanceDetails body) { + updateInstanceDetails(body); + return this; + } + + /** + * Build the instance of UpdateInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateInstanceRequest + */ + public UpdateInstanceRequest buildWithoutInvocationCallback() { + UpdateInstanceRequest request = new UpdateInstanceRequest(); + request.instanceId = instanceId; + request.updateInstanceDetails = updateInstanceDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateInstanceRequest(instanceId, updateInstanceDetails, 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() + .instanceId(instanceId) + .updateInstanceDetails(updateInstanceDetails) + .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(",instanceId=").append(String.valueOf(this.instanceId)); + sb.append(",updateInstanceDetails=").append(String.valueOf(this.updateInstanceDetails)); + 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 UpdateInstanceRequest)) { + return false; + } + + UpdateInstanceRequest other = (UpdateInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.updateInstanceDetails, other.updateInstanceDetails) + && 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.instanceId == null ? 43 : this.instanceId.hashCode()); + result = + (result * PRIME) + + (this.updateInstanceDetails == null + ? 43 + : this.updateInstanceDetails.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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CancelWorkRequestResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CancelWorkRequestResponse.java new file mode 100644 index 0000000000..60a70d3b27 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CancelWorkRequestResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CancelWorkRequestResponse 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 CancelWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 + */ + public Builder copy(CancelWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CancelWorkRequestResponse build() { + return new CancelWorkRequestResponse(__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 CancelWorkRequestResponse)) { + return false; + } + + CancelWorkRequestResponse other = (CancelWorkRequestResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ChangeInstanceCompartmentResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ChangeInstanceCompartmentResponse.java new file mode 100644 index 0000000000..92aa26eb24 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ChangeInstanceCompartmentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ChangeInstanceCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 ChangeInstanceCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 + */ + public Builder copy(ChangeInstanceCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeInstanceCompartmentResponse build() { + return new ChangeInstanceCompartmentResponse( + __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 ChangeInstanceCompartmentResponse)) { + return false; + } + + ChangeInstanceCompartmentResponse other = (ChangeInstanceCompartmentResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CreateInstanceResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CreateInstanceResponse.java new file mode 100644 index 0000000000..3051d32b21 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/CreateInstanceResponse.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class CreateInstanceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created instance. The instance OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created instance. The instance 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; + } + + /** + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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; + } + + /** + * The returned Instance instance. + */ + private com.oracle.bmc.ddfs.model.Instance instance; + + /** + * The returned Instance instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.Instance getInstance() { + return instance; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "instance" + }) + private CreateInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.ddfs.model.Instance instance) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.instance = instance; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created instance. The instance OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created instance. The instance 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; + } + + /** + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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; + } + + /** + * The returned Instance instance. + */ + private com.oracle.bmc.ddfs.model.Instance instance; + + /** + * The returned Instance instance. + * @param instance the value to set + * @return this builder + */ + public Builder instance(com.oracle.bmc.ddfs.model.Instance instance) { + this.instance = instance; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + instance(o.getInstance()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateInstanceResponse build() { + return new CreateInstanceResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + instance); + } + } + + /** + * 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(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",instance=").append(String.valueOf(instance)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateInstanceResponse)) { + return false; + } + + CreateInstanceResponse other = (CreateInstanceResponse) 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.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.instance, other.instance); + } + + @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.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.instance == null ? 43 : this.instance.hashCode()); + return result; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/DeleteInstanceResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/DeleteInstanceResponse.java new file mode 100644 index 0000000000..2ee6cf5f3c --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/DeleteInstanceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class DeleteInstanceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 DeleteInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 + */ + public Builder copy(DeleteInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteInstanceResponse build() { + return new DeleteInstanceResponse( + __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 DeleteInstanceResponse)) { + return false; + } + + DeleteInstanceResponse other = (DeleteInstanceResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetInstanceResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetInstanceResponse.java new file mode 100644 index 0000000000..bad647d079 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetInstanceResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetInstanceResponse 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 Instance instance. + */ + private com.oracle.bmc.ddfs.model.Instance instance; + + /** + * The returned Instance instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.Instance getInstance() { + return instance; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "instance" + }) + private GetInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.ddfs.model.Instance instance) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.instance = instance; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 Instance instance. + */ + private com.oracle.bmc.ddfs.model.Instance instance; + + /** + * The returned Instance instance. + * @param instance the value to set + * @return this builder + */ + public Builder instance(com.oracle.bmc.ddfs.model.Instance instance) { + this.instance = instance; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + instance(o.getInstance()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetInstanceResponse build() { + return new GetInstanceResponse( + __httpStatusCode__, headers, etag, opcRequestId, instance); + } + } + + /** + * 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(",instance=").append(String.valueOf(instance)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetInstanceResponse)) { + return false; + } + + GetInstanceResponse other = (GetInstanceResponse) 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.instance, other.instance); + } + + @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.instance == null ? 43 : this.instance.hashCode()); + return result; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetWorkRequestResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetWorkRequestResponse.java new file mode 100644 index 0000000000..d8835a2788 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/GetWorkRequestResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class GetWorkRequestResponse 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 WorkRequest instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.ddfs.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 WorkRequest instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.ddfs.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse 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 + */ + public GetWorkRequestResponse build() { + return new GetWorkRequestResponse( + __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 GetWorkRequestResponse)) { + return false; + } + + GetWorkRequestResponse other = (GetWorkRequestResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListInstancesResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListInstancesResponse.java new file mode 100644 index 0000000000..eca85b1200 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListInstancesResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListInstancesResponse 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.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.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned InstanceCollection instance. + */ + private com.oracle.bmc.ddfs.model.InstanceCollection instanceCollection; + + /** + * The returned InstanceCollection instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.InstanceCollection getInstanceCollection() { + return instanceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "instanceCollection" + }) + private ListInstancesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.ddfs.model.InstanceCollection instanceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.instanceCollection = instanceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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.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.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 InstanceCollection instance. + */ + private com.oracle.bmc.ddfs.model.InstanceCollection instanceCollection; + + /** + * The returned InstanceCollection instance. + * @param instanceCollection the value to set + * @return this builder + */ + public Builder instanceCollection( + com.oracle.bmc.ddfs.model.InstanceCollection instanceCollection) { + this.instanceCollection = instanceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInstancesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + instanceCollection(o.getInstanceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListInstancesResponse build() { + return new ListInstancesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, instanceCollection); + } + } + + /** + * 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(",instanceCollection=").append(String.valueOf(instanceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInstancesResponse)) { + return false; + } + + ListInstancesResponse other = (ListInstancesResponse) 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.instanceCollection, other.instanceCollection); + } + + @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.instanceCollection == null + ? 43 + : this.instanceCollection.hashCode()); + return result; + } +} diff --git a/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestErrorsResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 0000000000..d954f3a4fc --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestErrorsResponse 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.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.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 WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.WorkRequestErrorCollection getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.ddfs.model.WorkRequestErrorCollection workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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.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.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 WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.ddfs.model.WorkRequestErrorCollection workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse 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 + */ + public ListWorkRequestErrorsResponse build() { + return new ListWorkRequestErrorsResponse( + __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 ListWorkRequestErrorsResponse)) { + return false; + } + + ListWorkRequestErrorsResponse other = (ListWorkRequestErrorsResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestLogsResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 0000000000..2959f3c542 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestLogsResponse 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.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.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 WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestLogEntryCollection workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.ddfs.model.WorkRequestLogEntryCollection workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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.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.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 WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.ddfs.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse 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 + */ + public ListWorkRequestLogsResponse build() { + return new ListWorkRequestLogsResponse( + __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 ListWorkRequestLogsResponse)) { + return false; + } + + ListWorkRequestLogsResponse other = (ListWorkRequestLogsResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestsResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestsResponse.java new file mode 100644 index 0000000000..499e907e97 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/ListWorkRequestsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class ListWorkRequestsResponse 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.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.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.ddfs.model.WorkRequestSummaryCollection + getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.ddfs.model.WorkRequestSummaryCollection workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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.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.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 WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.ddfs.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.ddfs.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse 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 + */ + public ListWorkRequestsResponse build() { + return new ListWorkRequestsResponse( + __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 ListWorkRequestsResponse)) { + return false; + } + + ListWorkRequestsResponse other = (ListWorkRequestsResponse) 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-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/UpdateInstanceResponse.java b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/UpdateInstanceResponse.java new file mode 100644 index 0000000000..d985b9de28 --- /dev/null +++ b/bmc-ddfs/src/main/java/com/oracle/bmc/ddfs/responses/UpdateInstanceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.ddfs.responses; + +import com.oracle.bmc.ddfs.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260831") +public class UpdateInstanceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 UpdateInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 + */ + public Builder copy(UpdateInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateInstanceResponse build() { + return new UpdateInstanceResponse( + __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 UpdateInstanceResponse)) { + return false; + } + + UpdateInstanceResponse other = (UpdateInstanceResponse) 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-delegateaccesscontrol/pom.xml b/bmc-delegateaccesscontrol/pom.xml index 4c3b2f27ad..3da4c08000 100644 --- a/bmc-delegateaccesscontrol/pom.xml +++ b/bmc-delegateaccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-delegateaccesscontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-demandsignal/pom.xml b/bmc-demandsignal/pom.xml index f6a789f4b7..42ba9d0bc8 100644 --- a/bmc-demandsignal/pom.xml +++ b/bmc-demandsignal/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-demandsignal @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-desktops/pom.xml b/bmc-desktops/pom.xml index d3f9985492..34549b2286 100644 --- a/bmc-desktops/pom.xml +++ b/bmc-desktops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-desktops @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-devops/pom.xml b/bmc-devops/pom.xml index 5983b995b3..63a9cf9979 100644 --- a/bmc-devops/pom.xml +++ b/bmc-devops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-devops @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-dif/pom.xml b/bmc-dif/pom.xml index b998e34630..97c3cbadbb 100644 --- a/bmc-dif/pom.xml +++ b/bmc-dif/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-dif @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-disasterrecovery/pom.xml b/bmc-disasterrecovery/pom.xml index 68255ca357..1acfa09e52 100644 --- a/bmc-disasterrecovery/pom.xml +++ b/bmc-disasterrecovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-disasterrecovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-distributeddatabase/pom.xml b/bmc-distributeddatabase/pom.xml index 5f9a82779c..53958ac1a2 100644 --- a/bmc-distributeddatabase/pom.xml +++ b/bmc-distributeddatabase/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-distributeddatabase @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-distributeddatabasev26/pom.xml b/bmc-distributeddatabasev26/pom.xml new file mode 100644 index 0000000000..5fd36bcbf1 --- /dev/null +++ b/bmc-distributeddatabasev26/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.97.0 + ../pom.xml + + oci-java-sdk-distributeddatabasev26 + Oracle Cloud Infrastructure SDK - Distributed Database V26 + This project contains the SDK used for Oracle Cloud Infrastructure Distributed Database V26 + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.97.0 + + + \ No newline at end of file diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbService.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbService.java new file mode 100644 index 0000000000..818549921e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbService.java @@ -0,0 +1,428 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedAutonomousDbService 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); + + /** + * Add new Global database services control(GDS CTL) node for the Globally distributed autonomous database. + * + * @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 AddDistributedAutonomousDatabaseGdsControlNode API. + */ + AddDistributedAutonomousDatabaseGdsControlNodeResponse + addDistributedAutonomousDatabaseGdsControlNode( + AddDistributedAutonomousDatabaseGdsControlNodeRequest request); + + /** + * Move the Globally distributed autonomous database and its dependent resources to 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 ChangeDistributedAutonomousDatabaseCompartment API. + */ + ChangeDistributedAutonomousDatabaseCompartmentResponse + changeDistributedAutonomousDatabaseCompartment( + ChangeDistributedAutonomousDatabaseCompartmentRequest request); + + /** + * Change the DbBackupConfig for the Globally distributed autonomous database. + * + * @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 ChangeDistributedAutonomousDbBackupConfig API. + */ + ChangeDistributedAutonomousDbBackupConfigResponse changeDistributedAutonomousDbBackupConfig( + ChangeDistributedAutonomousDbBackupConfigRequest request); + + /** + * Configure autoResourceManagement options for the Globally distributed autonomous database. + * + * @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 ConfigureDistributedAutonomousDatabaseAutoResourceManagement API. + */ + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + configureDistributedAutonomousDatabaseAutoResourceManagement( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest request); + + /** + * Configure wallets on Global Service Manager(GSM) instances for a Globally distributed autonomous database. + * + * @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 ConfigureDistributedAutonomousDatabaseGsmWallet API. + */ + ConfigureDistributedAutonomousDatabaseGsmWalletResponse + configureDistributedAutonomousDatabaseGsmWallet( + ConfigureDistributedAutonomousDatabaseGsmWalletRequest request); + + /** + * Configure new Global Service Manager(GSM aka shard manager) instances for the Globally distributed autonomous database. + * + * @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 ConfigureDistributedAutonomousDatabaseGsms API. + */ + ConfigureDistributedAutonomousDatabaseGsmsResponse configureDistributedAutonomousDatabaseGsms( + ConfigureDistributedAutonomousDatabaseGsmsRequest request); + + /** + * Once all components of Globally distributed autonomous database are provisioned, this + * api shall be invoked to configure sharding on the Globally distributed autonomous database. Note that this 'ConfigureSharding' API also needs to be + * invoked after successfully adding a new shard to the Globally distributed autonomous database using PATCH api. If this API is not + * invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of + * the Globally distributed autonomous database. + * + * @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 ConfigureDistributedAutonomousDatabaseSharding API. + */ + ConfigureDistributedAutonomousDatabaseShardingResponse + configureDistributedAutonomousDatabaseSharding( + ConfigureDistributedAutonomousDatabaseShardingRequest request); + + /** + * Creates a Globally distributed autonomous database. + * + * @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 CreateDistributedAutonomousDatabase API. + */ + CreateDistributedAutonomousDatabaseResponse createDistributedAutonomousDatabase( + CreateDistributedAutonomousDatabaseRequest request); + + /** + * Terminate the given Globally distributed autonomous databases. + * + * @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 DeleteDistributedAutonomousDatabase API. + */ + DeleteDistributedAutonomousDatabaseResponse deleteDistributedAutonomousDatabase( + DeleteDistributedAutonomousDatabaseRequest request); + + /** + * Generate the wallet associated with Globally distributed autonomous database. + * + * @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 GenerateDistributedAutonomousDatabaseWallet API. + */ + GenerateDistributedAutonomousDatabaseWalletResponse generateDistributedAutonomousDatabaseWallet( + GenerateDistributedAutonomousDatabaseWalletRequest request); + + /** + * Gets the details of the Globally distributed autonomous database identified by given 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 GetDistributedAutonomousDatabase API. + */ + GetDistributedAutonomousDatabaseResponse getDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request); + + /** + * Operation to retrieve RAFT metrics for the Globally distributed autonomous database. If the Globally distributed + * autonomous database is not RAFT based then empty response is returned from the API. + * + * @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 GetDistributedAutonomousDatabaseRaftMetric API. + */ + GetDistributedAutonomousDatabaseRaftMetricResponse getDistributedAutonomousDatabaseRaftMetric( + GetDistributedAutonomousDatabaseRaftMetricRequest request); + + /** + * Operation to retrieve move RU invocation history and status for the Globally distributed autonomous database. + * Results are ordered by created timestamp in descending order. + * + * @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 GetDistributedAutonomousDatabaseRuChangeLog API. + */ + GetDistributedAutonomousDatabaseRuChangeLogResponse getDistributedAutonomousDatabaseRuChangeLog( + GetDistributedAutonomousDatabaseRuChangeLogRequest request); + + /** + * List of Globally distributed autonomous databases. + * + * @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 ListDistributedAutonomousDatabases API. + */ + ListDistributedAutonomousDatabasesResponse listDistributedAutonomousDatabases( + ListDistributedAutonomousDatabasesRequest request); + + /** + * Move the replication units for RAFT based globally distributed autonomous database from source shard to destination shard. + * + * @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 MoveDistributedAutonomousDatabaseReplicationUnit API. + */ + MoveDistributedAutonomousDatabaseReplicationUnitResponse + moveDistributedAutonomousDatabaseReplicationUnit( + MoveDistributedAutonomousDatabaseReplicationUnitRequest request); + + /** + * Patch operation to add, remove or update shards to the Globally distributed autonomous database topology. In single patch + * operation, multiple shards can be either added, or removed or updated. Combination of inserts, update + * and remove in single operation is not allowed. + * + * @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 PatchDistributedAutonomousDatabase API. + */ + PatchDistributedAutonomousDatabaseResponse patchDistributedAutonomousDatabase( + PatchDistributedAutonomousDatabaseRequest request); + + /** + * Recreate the failed resource for the Globally Distributed Autonomous Database. + * + * @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 RecreateFailedDistributedAutonomousDatabaseResource API. + */ + RecreateFailedDistributedAutonomousDatabaseResourceResponse + recreateFailedDistributedAutonomousDatabaseResource( + RecreateFailedDistributedAutonomousDatabaseResourceRequest request); + + /** + * Rotate the gsmuser and gsmcatuser passwords for shards and catalog of the Globally distributed autonomous database. This operation will also remove GdsCtlNodes if present. + * @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 RotateDistributedAutonomousDatabasePasswords API. + */ + RotateDistributedAutonomousDatabasePasswordsResponse + rotateDistributedAutonomousDatabasePasswords( + RotateDistributedAutonomousDatabasePasswordsRequest request); + + /** + * Scale global service manager(GSM aka shard director) instances for the Globally distributed autonomous database. + * + * @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 ScaleDistributedAutonomousDatabaseGsms API. + */ + ScaleDistributedAutonomousDatabaseGsmsResponse scaleDistributedAutonomousDatabaseGsms( + ScaleDistributedAutonomousDatabaseGsmsRequest request); + + /** + * Start the shards, catalog, GSMs and GDSCTL instances of Globally distributed autonomous database. + * @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 StartDistributedAutonomousDatabase API. + */ + StartDistributedAutonomousDatabaseResponse startDistributedAutonomousDatabase( + StartDistributedAutonomousDatabaseRequest request); + + /** + * Stop the shards, catalog, GSMs and GDSCTL instances for the Globally distributed autonomous database. + * @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 StopDistributedAutonomousDatabase API. + */ + StopDistributedAutonomousDatabaseResponse stopDistributedAutonomousDatabase( + StopDistributedAutonomousDatabaseRequest request); + + /** + * Updates the configuration of the Globally distributed autonomous database. + * + * @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 UpdateDistributedAutonomousDatabase API. + */ + UpdateDistributedAutonomousDatabaseResponse updateDistributedAutonomousDatabase( + UpdateDistributedAutonomousDatabaseRequest request); + + /** + * Validate the CA Bundles consistency of the globally distributed autonomous database. + * + * @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 ValidateDistributedAutonomousDatabaseCaBundle API. + */ + ValidateDistributedAutonomousDatabaseCaBundleResponse + validateDistributedAutonomousDatabaseCaBundle( + ValidateDistributedAutonomousDatabaseCaBundleRequest request); + + /** + * Validate the network connectivity between components of the globally distributed autonomous database. + * + * @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 ValidateDistributedAutonomousDatabaseNetwork API. + */ + ValidateDistributedAutonomousDatabaseNetworkResponse + validateDistributedAutonomousDatabaseNetwork( + ValidateDistributedAutonomousDatabaseNetworkRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + DistributedAutonomousDbServiceWaiters 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. + */ + DistributedAutonomousDbServicePaginators getPaginators(); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsync.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsync.java new file mode 100644 index 0000000000..96d7d56715 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsync.java @@ -0,0 +1,522 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedAutonomousDbServiceAsync 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); + + /** + * Add new Global database services control(GDS CTL) node for the Globally distributed autonomous database. + * + * + * @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 + addDistributedAutonomousDatabaseGdsControlNode( + AddDistributedAutonomousDatabaseGdsControlNodeRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + AddDistributedAutonomousDatabaseGdsControlNodeResponse> + handler); + + /** + * Move the Globally distributed autonomous database and its dependent resources to 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 + changeDistributedAutonomousDatabaseCompartment( + ChangeDistributedAutonomousDatabaseCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + ChangeDistributedAutonomousDatabaseCompartmentResponse> + handler); + + /** + * Change the DbBackupConfig for the Globally distributed autonomous database. + * + * + * @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 + changeDistributedAutonomousDbBackupConfig( + ChangeDistributedAutonomousDbBackupConfigRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDbBackupConfigRequest, + ChangeDistributedAutonomousDbBackupConfigResponse> + handler); + + /** + * Configure autoResourceManagement options for the Globally distributed autonomous database. + * + * + * @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< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + configureDistributedAutonomousDatabaseAutoResourceManagement( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + handler); + + /** + * Configure wallets on Global Service Manager(GSM) instances for a Globally distributed autonomous database. + * + * + * @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 + configureDistributedAutonomousDatabaseGsmWallet( + ConfigureDistributedAutonomousDatabaseGsmWalletRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + handler); + + /** + * Configure new Global Service Manager(GSM aka shard manager) instances for the Globally distributed autonomous database. + * + * + * @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 + configureDistributedAutonomousDatabaseGsms( + ConfigureDistributedAutonomousDatabaseGsmsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + ConfigureDistributedAutonomousDatabaseGsmsResponse> + handler); + + /** + * Once all components of Globally distributed autonomous database are provisioned, this + * api shall be invoked to configure sharding on the Globally distributed autonomous database. Note that this 'ConfigureSharding' API also needs to be + * invoked after successfully adding a new shard to the Globally distributed autonomous database using PATCH api. If this API is not + * invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of + * the Globally distributed autonomous database. + * + * + * @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 + configureDistributedAutonomousDatabaseSharding( + ConfigureDistributedAutonomousDatabaseShardingRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseShardingRequest, + ConfigureDistributedAutonomousDatabaseShardingResponse> + handler); + + /** + * Creates a Globally distributed autonomous database. + * + * + * @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 + createDistributedAutonomousDatabase( + CreateDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedAutonomousDatabaseRequest, + CreateDistributedAutonomousDatabaseResponse> + handler); + + /** + * Terminate the given Globally distributed autonomous databases. + * + * + * @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 + deleteDistributedAutonomousDatabase( + DeleteDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedAutonomousDatabaseRequest, + DeleteDistributedAutonomousDatabaseResponse> + handler); + + /** + * Generate the wallet associated with Globally distributed autonomous database. + * + * + * @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 + generateDistributedAutonomousDatabaseWallet( + GenerateDistributedAutonomousDatabaseWalletRequest request, + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedAutonomousDatabaseWalletRequest, + GenerateDistributedAutonomousDatabaseWalletResponse> + handler); + + /** + * Gets the details of the Globally distributed autonomous database identified by given 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 + getDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + handler); + + /** + * Operation to retrieve RAFT metrics for the Globally distributed autonomous database. If the Globally distributed + * autonomous database is not RAFT based then empty response is returned from the API. + * + * + * @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 + getDistributedAutonomousDatabaseRaftMetric( + GetDistributedAutonomousDatabaseRaftMetricRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRaftMetricRequest, + GetDistributedAutonomousDatabaseRaftMetricResponse> + handler); + + /** + * Operation to retrieve move RU invocation history and status for the Globally distributed autonomous database. + * Results are ordered by created timestamp in descending order. + * + * + * @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 + getDistributedAutonomousDatabaseRuChangeLog( + GetDistributedAutonomousDatabaseRuChangeLogRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRuChangeLogRequest, + GetDistributedAutonomousDatabaseRuChangeLogResponse> + handler); + + /** + * List of Globally distributed autonomous databases. + * + * + * @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 + listDistributedAutonomousDatabases( + ListDistributedAutonomousDatabasesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse> + handler); + + /** + * Move the replication units for RAFT based globally distributed autonomous database from source shard to destination shard. + * + * + * @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 + moveDistributedAutonomousDatabaseReplicationUnit( + MoveDistributedAutonomousDatabaseReplicationUnitRequest request, + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + MoveDistributedAutonomousDatabaseReplicationUnitResponse> + handler); + + /** + * Patch operation to add, remove or update shards to the Globally distributed autonomous database topology. In single patch + * operation, multiple shards can be either added, or removed or updated. Combination of inserts, update + * and remove in single operation is not allowed. + * + * + * @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 + patchDistributedAutonomousDatabase( + PatchDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedAutonomousDatabaseRequest, + PatchDistributedAutonomousDatabaseResponse> + handler); + + /** + * Recreate the failed resource for the Globally Distributed Autonomous Database. + * + * + * @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 + recreateFailedDistributedAutonomousDatabaseResource( + RecreateFailedDistributedAutonomousDatabaseResourceRequest request, + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, + RecreateFailedDistributedAutonomousDatabaseResourceResponse> + handler); + + /** + * Rotate the gsmuser and gsmcatuser passwords for shards and catalog of the Globally distributed autonomous database. This operation will also remove GdsCtlNodes if present. + * + * @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 + rotateDistributedAutonomousDatabasePasswords( + RotateDistributedAutonomousDatabasePasswordsRequest request, + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedAutonomousDatabasePasswordsRequest, + RotateDistributedAutonomousDatabasePasswordsResponse> + handler); + + /** + * Scale global service manager(GSM aka shard director) instances for the Globally distributed autonomous database. + * + * + * @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 + scaleDistributedAutonomousDatabaseGsms( + ScaleDistributedAutonomousDatabaseGsmsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedAutonomousDatabaseGsmsRequest, + ScaleDistributedAutonomousDatabaseGsmsResponse> + handler); + + /** + * Start the shards, catalog, GSMs and GDSCTL instances of Globally distributed autonomous database. + * + * @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 + startDistributedAutonomousDatabase( + StartDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StartDistributedAutonomousDatabaseRequest, + StartDistributedAutonomousDatabaseResponse> + handler); + + /** + * Stop the shards, catalog, GSMs and GDSCTL instances for the Globally distributed autonomous database. + * + * @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 + stopDistributedAutonomousDatabase( + StopDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StopDistributedAutonomousDatabaseRequest, + StopDistributedAutonomousDatabaseResponse> + handler); + + /** + * Updates the configuration of the Globally distributed autonomous database. + * + * + * @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 + updateDistributedAutonomousDatabase( + UpdateDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedAutonomousDatabaseRequest, + UpdateDistributedAutonomousDatabaseResponse> + handler); + + /** + * Validate the CA Bundles consistency of the globally distributed autonomous database. + * + * + * @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 + validateDistributedAutonomousDatabaseCaBundle( + ValidateDistributedAutonomousDatabaseCaBundleRequest request, + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseCaBundleRequest, + ValidateDistributedAutonomousDatabaseCaBundleResponse> + handler); + + /** + * Validate the network connectivity between components of the globally distributed autonomous database. + * + * + * @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 + validateDistributedAutonomousDatabaseNetwork( + ValidateDistributedAutonomousDatabaseNetworkRequest request, + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseNetworkRequest, + ValidateDistributedAutonomousDatabaseNetworkResponse> + handler); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsyncClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsyncClient.java new file mode 100644 index 0000000000..0a87a30780 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceAsyncClient.java @@ -0,0 +1,1898 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for DistributedAutonomousDbService 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedAutonomousDbServiceAsyncClient + implements DistributedAutonomousDbServiceAsync { + /** + * Service instance for DistributedAutonomousDbService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedAutonomousDbServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedAutonomousDbServiceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedAutonomousDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedAutonomousDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedAutonomousDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedAutonomousDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedAutonomousDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedAutonomousDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedAutonomousDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public DistributedAutonomousDbServiceAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "DistributedAutonomousDbServiceAsyncClient", + "generateDistributedAutonomousDatabaseWallet")); + } + } + + /** + * 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, DistributedAutonomousDbServiceAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedAutonomousDbServiceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedAutonomousDbServiceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + addDistributedAutonomousDatabaseGdsControlNode( + AddDistributedAutonomousDatabaseGdsControlNodeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + AddDistributedAutonomousDatabaseGdsControlNodeResponse> + handler) { + LOG.trace("Called async addDistributedAutonomousDatabaseGdsControlNode"); + final AddDistributedAutonomousDatabaseGdsControlNodeRequest interceptedRequest = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "AddDistributedAutonomousDatabaseGdsControlNode", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/AddDistributedAutonomousDatabaseGdsControlNode"); + final java.util.function.Function< + javax.ws.rs.core.Response, + AddDistributedAutonomousDatabaseGdsControlNodeResponse> + transformer = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + AddDistributedAutonomousDatabaseGdsControlNodeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + AddDistributedAutonomousDatabaseGdsControlNodeResponse>, + java.util.concurrent.Future< + AddDistributedAutonomousDatabaseGdsControlNodeResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getAddDistributedAutonomousDatabaseGdsControlNodeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + AddDistributedAutonomousDatabaseGdsControlNodeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDistributedAutonomousDatabaseCompartment( + ChangeDistributedAutonomousDatabaseCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + ChangeDistributedAutonomousDatabaseCompartmentResponse> + handler) { + LOG.trace("Called async changeDistributedAutonomousDatabaseCompartment"); + final ChangeDistributedAutonomousDatabaseCompartmentRequest interceptedRequest = + ChangeDistributedAutonomousDatabaseCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedAutonomousDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ChangeDistributedAutonomousDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ChangeDistributedAutonomousDatabaseCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedAutonomousDatabaseCompartmentResponse> + transformer = + ChangeDistributedAutonomousDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + ChangeDistributedAutonomousDatabaseCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + ChangeDistributedAutonomousDatabaseCompartmentResponse>, + java.util.concurrent.Future< + ChangeDistributedAutonomousDatabaseCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeDistributedAutonomousDatabaseCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + ChangeDistributedAutonomousDatabaseCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDistributedAutonomousDbBackupConfig( + ChangeDistributedAutonomousDbBackupConfigRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDbBackupConfigRequest, + ChangeDistributedAutonomousDbBackupConfigResponse> + handler) { + LOG.trace("Called async changeDistributedAutonomousDbBackupConfig"); + final ChangeDistributedAutonomousDbBackupConfigRequest interceptedRequest = + ChangeDistributedAutonomousDbBackupConfigConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedAutonomousDbBackupConfigConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ChangeDistributedAutonomousDbBackupConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ChangeDistributedAutonomousDbBackupConfig"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedAutonomousDbBackupConfigResponse> + transformer = + ChangeDistributedAutonomousDbBackupConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDbBackupConfigRequest, + ChangeDistributedAutonomousDbBackupConfigResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedAutonomousDbBackupConfigRequest, + ChangeDistributedAutonomousDbBackupConfigResponse>, + java.util.concurrent.Future< + ChangeDistributedAutonomousDbBackupConfigResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeDistributedAutonomousDbBackupConfigDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDistributedAutonomousDbBackupConfigRequest, + ChangeDistributedAutonomousDbBackupConfigResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + configureDistributedAutonomousDatabaseAutoResourceManagement( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + handler) { + LOG.trace("Called async configureDistributedAutonomousDatabaseAutoResourceManagement"); + final ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + interceptedRequest = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter + .interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseAutoResourceManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseAutoResourceManagement"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + transformer = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse>, + java.util.concurrent.Future< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedAutonomousDatabaseGsmWallet( + ConfigureDistributedAutonomousDatabaseGsmWalletRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + handler) { + LOG.trace("Called async configureDistributedAutonomousDatabaseGsmWallet"); + final ConfigureDistributedAutonomousDatabaseGsmWalletRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseGsmWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseGsmWallet"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + transformer = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse>, + java.util.concurrent.Future< + ConfigureDistributedAutonomousDatabaseGsmWalletResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConfigureDistributedAutonomousDatabaseGsmWalletDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedAutonomousDatabaseGsms( + ConfigureDistributedAutonomousDatabaseGsmsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + ConfigureDistributedAutonomousDatabaseGsmsResponse> + handler) { + LOG.trace("Called async configureDistributedAutonomousDatabaseGsms"); + final ConfigureDistributedAutonomousDatabaseGsmsRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseGsmsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseGsmsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseGsms"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseGsmsResponse> + transformer = + ConfigureDistributedAutonomousDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + ConfigureDistributedAutonomousDatabaseGsmsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + ConfigureDistributedAutonomousDatabaseGsmsResponse>, + java.util.concurrent.Future< + ConfigureDistributedAutonomousDatabaseGsmsResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConfigureDistributedAutonomousDatabaseGsmsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + ConfigureDistributedAutonomousDatabaseGsmsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedAutonomousDatabaseSharding( + ConfigureDistributedAutonomousDatabaseShardingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseShardingRequest, + ConfigureDistributedAutonomousDatabaseShardingResponse> + handler) { + LOG.trace("Called async configureDistributedAutonomousDatabaseSharding"); + final ConfigureDistributedAutonomousDatabaseShardingRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseShardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseShardingConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseSharding", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseSharding"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseShardingResponse> + transformer = + ConfigureDistributedAutonomousDatabaseShardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseShardingRequest, + ConfigureDistributedAutonomousDatabaseShardingResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedAutonomousDatabaseShardingRequest, + ConfigureDistributedAutonomousDatabaseShardingResponse>, + java.util.concurrent.Future< + ConfigureDistributedAutonomousDatabaseShardingResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedAutonomousDatabaseShardingRequest, + ConfigureDistributedAutonomousDatabaseShardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createDistributedAutonomousDatabase( + CreateDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDistributedAutonomousDatabaseRequest, + CreateDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async createDistributedAutonomousDatabase"); + final CreateDistributedAutonomousDatabaseRequest interceptedRequest = + CreateDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "CreateDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateDistributedAutonomousDatabaseResponse> + transformer = + CreateDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedAutonomousDatabaseRequest, + CreateDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedAutonomousDatabaseRequest, + CreateDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDistributedAutonomousDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDistributedAutonomousDatabaseRequest, + CreateDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteDistributedAutonomousDatabase( + DeleteDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedAutonomousDatabaseRequest, + DeleteDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async deleteDistributedAutonomousDatabase"); + final DeleteDistributedAutonomousDatabaseRequest interceptedRequest = + DeleteDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "DeleteDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/DeleteDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteDistributedAutonomousDatabaseResponse> + transformer = + DeleteDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedAutonomousDatabaseRequest, + DeleteDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedAutonomousDatabaseRequest, + DeleteDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDistributedAutonomousDatabaseRequest, + DeleteDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + generateDistributedAutonomousDatabaseWallet( + GenerateDistributedAutonomousDatabaseWalletRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedAutonomousDatabaseWalletRequest, + GenerateDistributedAutonomousDatabaseWalletResponse> + handler) { + LOG.trace("Called async generateDistributedAutonomousDatabaseWallet"); + final GenerateDistributedAutonomousDatabaseWalletRequest interceptedRequest = + GenerateDistributedAutonomousDatabaseWalletConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateDistributedAutonomousDatabaseWalletConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GenerateDistributedAutonomousDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/GenerateDistributedAutonomousDatabaseWallet"); + final java.util.function.Function< + javax.ws.rs.core.Response, + GenerateDistributedAutonomousDatabaseWalletResponse> + transformer = + GenerateDistributedAutonomousDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedAutonomousDatabaseWalletRequest, + GenerateDistributedAutonomousDatabaseWalletResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedAutonomousDatabaseWalletRequest, + GenerateDistributedAutonomousDatabaseWalletResponse>, + java.util.concurrent.Future< + GenerateDistributedAutonomousDatabaseWalletResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getGenerateDistributedAutonomousDatabaseWalletDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GenerateDistributedAutonomousDatabaseWalletRequest, + GenerateDistributedAutonomousDatabaseWalletResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async getDistributedAutonomousDatabase"); + final GetDistributedAutonomousDatabaseRequest interceptedRequest = + GetDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/GetDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedAutonomousDatabaseResponse> + transformer = + GetDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedAutonomousDatabaseRaftMetric( + GetDistributedAutonomousDatabaseRaftMetricRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRaftMetricRequest, + GetDistributedAutonomousDatabaseRaftMetricResponse> + handler) { + LOG.trace("Called async getDistributedAutonomousDatabaseRaftMetric"); + final GetDistributedAutonomousDatabaseRaftMetricRequest interceptedRequest = + GetDistributedAutonomousDatabaseRaftMetricConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseRaftMetricConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabaseRaftMetric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedAutonomousDatabaseRaftMetric"); + final java.util.function.Function< + javax.ws.rs.core.Response, + GetDistributedAutonomousDatabaseRaftMetricResponse> + transformer = + GetDistributedAutonomousDatabaseRaftMetricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRaftMetricRequest, + GetDistributedAutonomousDatabaseRaftMetricResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRaftMetricRequest, + GetDistributedAutonomousDatabaseRaftMetricResponse>, + java.util.concurrent.Future< + GetDistributedAutonomousDatabaseRaftMetricResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedAutonomousDatabaseRaftMetricRequest, + GetDistributedAutonomousDatabaseRaftMetricResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedAutonomousDatabaseRuChangeLog( + GetDistributedAutonomousDatabaseRuChangeLogRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRuChangeLogRequest, + GetDistributedAutonomousDatabaseRuChangeLogResponse> + handler) { + LOG.trace("Called async getDistributedAutonomousDatabaseRuChangeLog"); + final GetDistributedAutonomousDatabaseRuChangeLogRequest interceptedRequest = + GetDistributedAutonomousDatabaseRuChangeLogConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseRuChangeLogConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabaseRuChangeLog", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedAutonomousDatabaseRuChangeLog"); + final java.util.function.Function< + javax.ws.rs.core.Response, + GetDistributedAutonomousDatabaseRuChangeLogResponse> + transformer = + GetDistributedAutonomousDatabaseRuChangeLogConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRuChangeLogRequest, + GetDistributedAutonomousDatabaseRuChangeLogResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedAutonomousDatabaseRuChangeLogRequest, + GetDistributedAutonomousDatabaseRuChangeLogResponse>, + java.util.concurrent.Future< + GetDistributedAutonomousDatabaseRuChangeLogResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedAutonomousDatabaseRuChangeLogRequest, + GetDistributedAutonomousDatabaseRuChangeLogResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDistributedAutonomousDatabases( + ListDistributedAutonomousDatabasesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse> + handler) { + LOG.trace("Called async listDistributedAutonomousDatabases"); + final ListDistributedAutonomousDatabasesRequest interceptedRequest = + ListDistributedAutonomousDatabasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedAutonomousDatabasesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ListDistributedAutonomousDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabaseCollection/ListDistributedAutonomousDatabases"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDistributedAutonomousDatabasesResponse> + transformer = + ListDistributedAutonomousDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + moveDistributedAutonomousDatabaseReplicationUnit( + MoveDistributedAutonomousDatabaseReplicationUnitRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + MoveDistributedAutonomousDatabaseReplicationUnitResponse> + handler) { + LOG.trace("Called async moveDistributedAutonomousDatabaseReplicationUnit"); + final MoveDistributedAutonomousDatabaseReplicationUnitRequest interceptedRequest = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "MoveDistributedAutonomousDatabaseReplicationUnit", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/MoveDistributedAutonomousDatabaseReplicationUnit"); + final java.util.function.Function< + javax.ws.rs.core.Response, + MoveDistributedAutonomousDatabaseReplicationUnitResponse> + transformer = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + MoveDistributedAutonomousDatabaseReplicationUnitResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + MoveDistributedAutonomousDatabaseReplicationUnitResponse>, + java.util.concurrent.Future< + MoveDistributedAutonomousDatabaseReplicationUnitResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getMoveDistributedAutonomousDatabaseReplicationUnitDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + MoveDistributedAutonomousDatabaseReplicationUnitResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + patchDistributedAutonomousDatabase( + PatchDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchDistributedAutonomousDatabaseRequest, + PatchDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async patchDistributedAutonomousDatabase"); + final PatchDistributedAutonomousDatabaseRequest interceptedRequest = + PatchDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "PatchDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/PatchDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchDistributedAutonomousDatabaseResponse> + transformer = + PatchDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedAutonomousDatabaseRequest, + PatchDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedAutonomousDatabaseRequest, + PatchDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchDistributedAutonomousDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchDistributedAutonomousDatabaseRequest, + PatchDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + recreateFailedDistributedAutonomousDatabaseResource( + RecreateFailedDistributedAutonomousDatabaseResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, + RecreateFailedDistributedAutonomousDatabaseResourceResponse> + handler) { + LOG.trace("Called async recreateFailedDistributedAutonomousDatabaseResource"); + final RecreateFailedDistributedAutonomousDatabaseResourceRequest interceptedRequest = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.interceptRequest( + request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "RecreateFailedDistributedAutonomousDatabaseResource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/RecreateFailedDistributedAutonomousDatabaseResource"); + final java.util.function.Function< + javax.ws.rs.core.Response, + RecreateFailedDistributedAutonomousDatabaseResourceResponse> + transformer = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, + RecreateFailedDistributedAutonomousDatabaseResourceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, + RecreateFailedDistributedAutonomousDatabaseResourceResponse>, + java.util.concurrent.Future< + RecreateFailedDistributedAutonomousDatabaseResourceResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, + RecreateFailedDistributedAutonomousDatabaseResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + rotateDistributedAutonomousDatabasePasswords( + RotateDistributedAutonomousDatabasePasswordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RotateDistributedAutonomousDatabasePasswordsRequest, + RotateDistributedAutonomousDatabasePasswordsResponse> + handler) { + LOG.trace("Called async rotateDistributedAutonomousDatabasePasswords"); + final RotateDistributedAutonomousDatabasePasswordsRequest interceptedRequest = + RotateDistributedAutonomousDatabasePasswordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RotateDistributedAutonomousDatabasePasswordsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "RotateDistributedAutonomousDatabasePasswords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/RotateDistributedAutonomousDatabasePasswords"); + final java.util.function.Function< + javax.ws.rs.core.Response, + RotateDistributedAutonomousDatabasePasswordsResponse> + transformer = + RotateDistributedAutonomousDatabasePasswordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedAutonomousDatabasePasswordsRequest, + RotateDistributedAutonomousDatabasePasswordsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedAutonomousDatabasePasswordsRequest, + RotateDistributedAutonomousDatabasePasswordsResponse>, + java.util.concurrent.Future< + RotateDistributedAutonomousDatabasePasswordsResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getRotateDistributedAutonomousDatabasePasswordsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RotateDistributedAutonomousDatabasePasswordsRequest, + RotateDistributedAutonomousDatabasePasswordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + scaleDistributedAutonomousDatabaseGsms( + ScaleDistributedAutonomousDatabaseGsmsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedAutonomousDatabaseGsmsRequest, + ScaleDistributedAutonomousDatabaseGsmsResponse> + handler) { + LOG.trace("Called async scaleDistributedAutonomousDatabaseGsms"); + final ScaleDistributedAutonomousDatabaseGsmsRequest interceptedRequest = + ScaleDistributedAutonomousDatabaseGsmsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScaleDistributedAutonomousDatabaseGsmsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ScaleDistributedAutonomousDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ScaleDistributedAutonomousDatabaseGsms"); + final java.util.function.Function< + javax.ws.rs.core.Response, ScaleDistributedAutonomousDatabaseGsmsResponse> + transformer = + ScaleDistributedAutonomousDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedAutonomousDatabaseGsmsRequest, + ScaleDistributedAutonomousDatabaseGsmsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedAutonomousDatabaseGsmsRequest, + ScaleDistributedAutonomousDatabaseGsmsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getScaleDistributedAutonomousDatabaseGsmsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ScaleDistributedAutonomousDatabaseGsmsRequest, + ScaleDistributedAutonomousDatabaseGsmsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + startDistributedAutonomousDatabase( + StartDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StartDistributedAutonomousDatabaseRequest, + StartDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async startDistributedAutonomousDatabase"); + final StartDistributedAutonomousDatabaseRequest interceptedRequest = + StartDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "StartDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/StartDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, StartDistributedAutonomousDatabaseResponse> + transformer = + StartDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StartDistributedAutonomousDatabaseRequest, + StartDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StartDistributedAutonomousDatabaseRequest, + StartDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StartDistributedAutonomousDatabaseRequest, + StartDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + stopDistributedAutonomousDatabase( + StopDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StopDistributedAutonomousDatabaseRequest, + StopDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async stopDistributedAutonomousDatabase"); + final StopDistributedAutonomousDatabaseRequest interceptedRequest = + StopDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "StopDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/StopDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, StopDistributedAutonomousDatabaseResponse> + transformer = + StopDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StopDistributedAutonomousDatabaseRequest, + StopDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StopDistributedAutonomousDatabaseRequest, + StopDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StopDistributedAutonomousDatabaseRequest, + StopDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateDistributedAutonomousDatabase( + UpdateDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedAutonomousDatabaseRequest, + UpdateDistributedAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async updateDistributedAutonomousDatabase"); + final UpdateDistributedAutonomousDatabaseRequest interceptedRequest = + UpdateDistributedAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "UpdateDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/UpdateDistributedAutonomousDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateDistributedAutonomousDatabaseResponse> + transformer = + UpdateDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedAutonomousDatabaseRequest, + UpdateDistributedAutonomousDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedAutonomousDatabaseRequest, + UpdateDistributedAutonomousDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDistributedAutonomousDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDistributedAutonomousDatabaseRequest, + UpdateDistributedAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + validateDistributedAutonomousDatabaseCaBundle( + ValidateDistributedAutonomousDatabaseCaBundleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseCaBundleRequest, + ValidateDistributedAutonomousDatabaseCaBundleResponse> + handler) { + LOG.trace("Called async validateDistributedAutonomousDatabaseCaBundle"); + final ValidateDistributedAutonomousDatabaseCaBundleRequest interceptedRequest = + ValidateDistributedAutonomousDatabaseCaBundleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedAutonomousDatabaseCaBundleConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ValidateDistributedAutonomousDatabaseCaBundle", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ValidateDistributedAutonomousDatabaseCaBundle"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ValidateDistributedAutonomousDatabaseCaBundleResponse> + transformer = + ValidateDistributedAutonomousDatabaseCaBundleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseCaBundleRequest, + ValidateDistributedAutonomousDatabaseCaBundleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseCaBundleRequest, + ValidateDistributedAutonomousDatabaseCaBundleResponse>, + java.util.concurrent.Future< + ValidateDistributedAutonomousDatabaseCaBundleResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ValidateDistributedAutonomousDatabaseCaBundleRequest, + ValidateDistributedAutonomousDatabaseCaBundleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + validateDistributedAutonomousDatabaseNetwork( + ValidateDistributedAutonomousDatabaseNetworkRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseNetworkRequest, + ValidateDistributedAutonomousDatabaseNetworkResponse> + handler) { + LOG.trace("Called async validateDistributedAutonomousDatabaseNetwork"); + final ValidateDistributedAutonomousDatabaseNetworkRequest interceptedRequest = + ValidateDistributedAutonomousDatabaseNetworkConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedAutonomousDatabaseNetworkConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ValidateDistributedAutonomousDatabaseNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ValidateDistributedAutonomousDatabaseNetwork"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ValidateDistributedAutonomousDatabaseNetworkResponse> + transformer = + ValidateDistributedAutonomousDatabaseNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseNetworkRequest, + ValidateDistributedAutonomousDatabaseNetworkResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedAutonomousDatabaseNetworkRequest, + ValidateDistributedAutonomousDatabaseNetworkResponse>, + java.util.concurrent.Future< + ValidateDistributedAutonomousDatabaseNetworkResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ValidateDistributedAutonomousDatabaseNetworkRequest, + ValidateDistributedAutonomousDatabaseNetworkResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceClient.java new file mode 100644 index 0000000000..43cae12aab --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceClient.java @@ -0,0 +1,1656 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedAutonomousDbServiceClient implements DistributedAutonomousDbService { + /** + * Service instance for DistributedAutonomousDbService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedAutonomousDbServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedAutonomousDbServiceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final DistributedAutonomousDbServiceWaiters waiters; + + private final DistributedAutonomousDbServicePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedAutonomousDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedAutonomousDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedAutonomousDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedAutonomousDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedAutonomousDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedAutonomousDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedAutonomousDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public DistributedAutonomousDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected DistributedAutonomousDbServiceClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("DistributedAutonomousDbService-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new DistributedAutonomousDbServiceWaiters(executorService, this); + + this.paginators = new DistributedAutonomousDbServicePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "DistributedAutonomousDbServiceClient", + "generateDistributedAutonomousDatabaseWallet")); + } + } + + /** + * 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, DistributedAutonomousDbServiceClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedAutonomousDbServiceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedAutonomousDbServiceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public AddDistributedAutonomousDatabaseGdsControlNodeResponse + addDistributedAutonomousDatabaseGdsControlNode( + AddDistributedAutonomousDatabaseGdsControlNodeRequest request) { + LOG.trace("Called addDistributedAutonomousDatabaseGdsControlNode"); + final AddDistributedAutonomousDatabaseGdsControlNodeRequest interceptedRequest = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "AddDistributedAutonomousDatabaseGdsControlNode", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/AddDistributedAutonomousDatabaseGdsControlNode"); + java.util.function.Function< + javax.ws.rs.core.Response, + AddDistributedAutonomousDatabaseGdsControlNodeResponse> + transformer = + AddDistributedAutonomousDatabaseGdsControlNodeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getAddDistributedAutonomousDatabaseGdsControlNodeDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDistributedAutonomousDatabaseCompartmentResponse + changeDistributedAutonomousDatabaseCompartment( + ChangeDistributedAutonomousDatabaseCompartmentRequest request) { + LOG.trace("Called changeDistributedAutonomousDatabaseCompartment"); + final ChangeDistributedAutonomousDatabaseCompartmentRequest interceptedRequest = + ChangeDistributedAutonomousDatabaseCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedAutonomousDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ChangeDistributedAutonomousDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ChangeDistributedAutonomousDatabaseCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedAutonomousDatabaseCompartmentResponse> + transformer = + ChangeDistributedAutonomousDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDistributedAutonomousDatabaseCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDistributedAutonomousDbBackupConfigResponse + changeDistributedAutonomousDbBackupConfig( + ChangeDistributedAutonomousDbBackupConfigRequest request) { + LOG.trace("Called changeDistributedAutonomousDbBackupConfig"); + final ChangeDistributedAutonomousDbBackupConfigRequest interceptedRequest = + ChangeDistributedAutonomousDbBackupConfigConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedAutonomousDbBackupConfigConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ChangeDistributedAutonomousDbBackupConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ChangeDistributedAutonomousDbBackupConfig"); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedAutonomousDbBackupConfigResponse> + transformer = + ChangeDistributedAutonomousDbBackupConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDistributedAutonomousDbBackupConfigDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + configureDistributedAutonomousDatabaseAutoResourceManagement( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest request) { + LOG.trace("Called configureDistributedAutonomousDatabaseAutoResourceManagement"); + final ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + interceptedRequest = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter + .interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseAutoResourceManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseAutoResourceManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + transformer = + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedAutonomousDatabaseGsmWalletResponse + configureDistributedAutonomousDatabaseGsmWallet( + ConfigureDistributedAutonomousDatabaseGsmWalletRequest request) { + LOG.trace("Called configureDistributedAutonomousDatabaseGsmWallet"); + final ConfigureDistributedAutonomousDatabaseGsmWalletRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseGsmWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseGsmWallet"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + transformer = + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureDistributedAutonomousDatabaseGsmWalletDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedAutonomousDatabaseGsmsResponse + configureDistributedAutonomousDatabaseGsms( + ConfigureDistributedAutonomousDatabaseGsmsRequest request) { + LOG.trace("Called configureDistributedAutonomousDatabaseGsms"); + final ConfigureDistributedAutonomousDatabaseGsmsRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseGsmsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseGsmsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseGsms"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseGsmsResponse> + transformer = + ConfigureDistributedAutonomousDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureDistributedAutonomousDatabaseGsmsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedAutonomousDatabaseShardingResponse + configureDistributedAutonomousDatabaseSharding( + ConfigureDistributedAutonomousDatabaseShardingRequest request) { + LOG.trace("Called configureDistributedAutonomousDatabaseSharding"); + final ConfigureDistributedAutonomousDatabaseShardingRequest interceptedRequest = + ConfigureDistributedAutonomousDatabaseShardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedAutonomousDatabaseShardingConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ConfigureDistributedAutonomousDatabaseSharding", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ConfigureDistributedAutonomousDatabaseSharding"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedAutonomousDatabaseShardingResponse> + transformer = + ConfigureDistributedAutonomousDatabaseShardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDistributedAutonomousDatabaseResponse createDistributedAutonomousDatabase( + CreateDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called createDistributedAutonomousDatabase"); + final CreateDistributedAutonomousDatabaseRequest interceptedRequest = + CreateDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "CreateDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, CreateDistributedAutonomousDatabaseResponse> + transformer = + CreateDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateDistributedAutonomousDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDistributedAutonomousDatabaseResponse deleteDistributedAutonomousDatabase( + DeleteDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called deleteDistributedAutonomousDatabase"); + final DeleteDistributedAutonomousDatabaseRequest interceptedRequest = + DeleteDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "DeleteDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/DeleteDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteDistributedAutonomousDatabaseResponse> + transformer = + DeleteDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateDistributedAutonomousDatabaseWalletResponse + generateDistributedAutonomousDatabaseWallet( + GenerateDistributedAutonomousDatabaseWalletRequest request) { + LOG.trace("Called generateDistributedAutonomousDatabaseWallet"); + final GenerateDistributedAutonomousDatabaseWalletRequest interceptedRequest = + GenerateDistributedAutonomousDatabaseWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateDistributedAutonomousDatabaseWalletConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GenerateDistributedAutonomousDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/GenerateDistributedAutonomousDatabaseWallet"); + java.util.function.Function< + javax.ws.rs.core.Response, + GenerateDistributedAutonomousDatabaseWalletResponse> + transformer = + GenerateDistributedAutonomousDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateDistributedAutonomousDatabaseWalletDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedAutonomousDatabaseResponse getDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called getDistributedAutonomousDatabase"); + final GetDistributedAutonomousDatabaseRequest interceptedRequest = + GetDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/GetDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedAutonomousDatabaseResponse> + transformer = + GetDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedAutonomousDatabaseRaftMetricResponse + getDistributedAutonomousDatabaseRaftMetric( + GetDistributedAutonomousDatabaseRaftMetricRequest request) { + LOG.trace("Called getDistributedAutonomousDatabaseRaftMetric"); + final GetDistributedAutonomousDatabaseRaftMetricRequest interceptedRequest = + GetDistributedAutonomousDatabaseRaftMetricConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseRaftMetricConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabaseRaftMetric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedAutonomousDatabaseRaftMetric"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetDistributedAutonomousDatabaseRaftMetricResponse> + transformer = + GetDistributedAutonomousDatabaseRaftMetricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedAutonomousDatabaseRuChangeLogResponse + getDistributedAutonomousDatabaseRuChangeLog( + GetDistributedAutonomousDatabaseRuChangeLogRequest request) { + LOG.trace("Called getDistributedAutonomousDatabaseRuChangeLog"); + final GetDistributedAutonomousDatabaseRuChangeLogRequest interceptedRequest = + GetDistributedAutonomousDatabaseRuChangeLogConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedAutonomousDatabaseRuChangeLogConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "GetDistributedAutonomousDatabaseRuChangeLog", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedAutonomousDatabaseRuChangeLog"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetDistributedAutonomousDatabaseRuChangeLogResponse> + transformer = + GetDistributedAutonomousDatabaseRuChangeLogConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDistributedAutonomousDatabasesResponse listDistributedAutonomousDatabases( + ListDistributedAutonomousDatabasesRequest request) { + LOG.trace("Called listDistributedAutonomousDatabases"); + final ListDistributedAutonomousDatabasesRequest interceptedRequest = + ListDistributedAutonomousDatabasesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedAutonomousDatabasesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ListDistributedAutonomousDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabaseCollection/ListDistributedAutonomousDatabases"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDistributedAutonomousDatabasesResponse> + transformer = + ListDistributedAutonomousDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public MoveDistributedAutonomousDatabaseReplicationUnitResponse + moveDistributedAutonomousDatabaseReplicationUnit( + MoveDistributedAutonomousDatabaseReplicationUnitRequest request) { + LOG.trace("Called moveDistributedAutonomousDatabaseReplicationUnit"); + final MoveDistributedAutonomousDatabaseReplicationUnitRequest interceptedRequest = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "MoveDistributedAutonomousDatabaseReplicationUnit", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/MoveDistributedAutonomousDatabaseReplicationUnit"); + java.util.function.Function< + javax.ws.rs.core.Response, + MoveDistributedAutonomousDatabaseReplicationUnitResponse> + transformer = + MoveDistributedAutonomousDatabaseReplicationUnitConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getMoveDistributedAutonomousDatabaseReplicationUnitDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PatchDistributedAutonomousDatabaseResponse patchDistributedAutonomousDatabase( + PatchDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called patchDistributedAutonomousDatabase"); + final PatchDistributedAutonomousDatabaseRequest interceptedRequest = + PatchDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "PatchDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/PatchDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, PatchDistributedAutonomousDatabaseResponse> + transformer = + PatchDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, + retriedRequest + .getPatchDistributedAutonomousDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RecreateFailedDistributedAutonomousDatabaseResourceResponse + recreateFailedDistributedAutonomousDatabaseResource( + RecreateFailedDistributedAutonomousDatabaseResourceRequest request) { + LOG.trace("Called recreateFailedDistributedAutonomousDatabaseResource"); + final RecreateFailedDistributedAutonomousDatabaseResourceRequest interceptedRequest = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "RecreateFailedDistributedAutonomousDatabaseResource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/RecreateFailedDistributedAutonomousDatabaseResource"); + java.util.function.Function< + javax.ws.rs.core.Response, + RecreateFailedDistributedAutonomousDatabaseResourceResponse> + transformer = + RecreateFailedDistributedAutonomousDatabaseResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RotateDistributedAutonomousDatabasePasswordsResponse + rotateDistributedAutonomousDatabasePasswords( + RotateDistributedAutonomousDatabasePasswordsRequest request) { + LOG.trace("Called rotateDistributedAutonomousDatabasePasswords"); + final RotateDistributedAutonomousDatabasePasswordsRequest interceptedRequest = + RotateDistributedAutonomousDatabasePasswordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RotateDistributedAutonomousDatabasePasswordsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "RotateDistributedAutonomousDatabasePasswords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/RotateDistributedAutonomousDatabasePasswords"); + java.util.function.Function< + javax.ws.rs.core.Response, + RotateDistributedAutonomousDatabasePasswordsResponse> + transformer = + RotateDistributedAutonomousDatabasePasswordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRotateDistributedAutonomousDatabasePasswordsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ScaleDistributedAutonomousDatabaseGsmsResponse scaleDistributedAutonomousDatabaseGsms( + ScaleDistributedAutonomousDatabaseGsmsRequest request) { + LOG.trace("Called scaleDistributedAutonomousDatabaseGsms"); + final ScaleDistributedAutonomousDatabaseGsmsRequest interceptedRequest = + ScaleDistributedAutonomousDatabaseGsmsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScaleDistributedAutonomousDatabaseGsmsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ScaleDistributedAutonomousDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ScaleDistributedAutonomousDatabaseGsms"); + java.util.function.Function< + javax.ws.rs.core.Response, ScaleDistributedAutonomousDatabaseGsmsResponse> + transformer = + ScaleDistributedAutonomousDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getScaleDistributedAutonomousDatabaseGsmsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StartDistributedAutonomousDatabaseResponse startDistributedAutonomousDatabase( + StartDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called startDistributedAutonomousDatabase"); + final StartDistributedAutonomousDatabaseRequest interceptedRequest = + StartDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "StartDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/StartDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, StartDistributedAutonomousDatabaseResponse> + transformer = + StartDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StopDistributedAutonomousDatabaseResponse stopDistributedAutonomousDatabase( + StopDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called stopDistributedAutonomousDatabase"); + final StopDistributedAutonomousDatabaseRequest interceptedRequest = + StopDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopDistributedAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "StopDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/StopDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, StopDistributedAutonomousDatabaseResponse> + transformer = + StopDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDistributedAutonomousDatabaseResponse updateDistributedAutonomousDatabase( + UpdateDistributedAutonomousDatabaseRequest request) { + LOG.trace("Called updateDistributedAutonomousDatabase"); + final UpdateDistributedAutonomousDatabaseRequest interceptedRequest = + UpdateDistributedAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedAutonomousDatabaseConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "UpdateDistributedAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/UpdateDistributedAutonomousDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateDistributedAutonomousDatabaseResponse> + transformer = + UpdateDistributedAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateDistributedAutonomousDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ValidateDistributedAutonomousDatabaseCaBundleResponse + validateDistributedAutonomousDatabaseCaBundle( + ValidateDistributedAutonomousDatabaseCaBundleRequest request) { + LOG.trace("Called validateDistributedAutonomousDatabaseCaBundle"); + final ValidateDistributedAutonomousDatabaseCaBundleRequest interceptedRequest = + ValidateDistributedAutonomousDatabaseCaBundleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedAutonomousDatabaseCaBundleConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ValidateDistributedAutonomousDatabaseCaBundle", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ValidateDistributedAutonomousDatabaseCaBundle"); + java.util.function.Function< + javax.ws.rs.core.Response, + ValidateDistributedAutonomousDatabaseCaBundleResponse> + transformer = + ValidateDistributedAutonomousDatabaseCaBundleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ValidateDistributedAutonomousDatabaseNetworkResponse + validateDistributedAutonomousDatabaseNetwork( + ValidateDistributedAutonomousDatabaseNetworkRequest request) { + LOG.trace("Called validateDistributedAutonomousDatabaseNetwork"); + final ValidateDistributedAutonomousDatabaseNetworkRequest interceptedRequest = + ValidateDistributedAutonomousDatabaseNetworkConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedAutonomousDatabaseNetworkConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedAutonomousDbService", + "ValidateDistributedAutonomousDatabaseNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedAutonomousDatabase/ValidateDistributedAutonomousDatabaseNetwork"); + java.util.function.Function< + javax.ws.rs.core.Response, + ValidateDistributedAutonomousDatabaseNetworkResponse> + transformer = + ValidateDistributedAutonomousDatabaseNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DistributedAutonomousDbServiceWaiters getWaiters() { + return waiters; + } + + @Override + public DistributedAutonomousDbServicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServicePaginators.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServicePaginators.java new file mode 100644 index 0000000000..c1ce590437 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServicePaginators.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of DistributedAutonomousDbService 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedAutonomousDbServicePaginators { + private final DistributedAutonomousDbService client; + + public DistributedAutonomousDbServicePaginators(DistributedAutonomousDbService client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDistributedAutonomousDatabases 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 + listDistributedAutonomousDatabasesResponseIterator( + final ListDistributedAutonomousDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDistributedAutonomousDatabasesRequest.Builder, + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse>( + new java.util.function.Supplier< + ListDistributedAutonomousDatabasesRequest.Builder>() { + @Override + public ListDistributedAutonomousDatabasesRequest.Builder get() { + return ListDistributedAutonomousDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListDistributedAutonomousDatabasesResponse, String>() { + @Override + public String apply(ListDistributedAutonomousDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedAutonomousDatabasesRequest.Builder>, + ListDistributedAutonomousDatabasesRequest>() { + @Override + public ListDistributedAutonomousDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedAutonomousDatabasesRequest.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< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse>() { + @Override + public ListDistributedAutonomousDatabasesResponse apply( + ListDistributedAutonomousDatabasesRequest request) { + return client.listDistributedAutonomousDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseSummary} objects + * contained in responses from the listDistributedAutonomousDatabases 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.distributeddatabasev26.model.DistributedAutonomousDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseSummary> + listDistributedAutonomousDatabasesRecordIterator( + final ListDistributedAutonomousDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDistributedAutonomousDatabasesRequest.Builder, + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseSummary>( + new java.util.function.Supplier< + ListDistributedAutonomousDatabasesRequest.Builder>() { + @Override + public ListDistributedAutonomousDatabasesRequest.Builder get() { + return ListDistributedAutonomousDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListDistributedAutonomousDatabasesResponse, String>() { + @Override + public String apply(ListDistributedAutonomousDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedAutonomousDatabasesRequest.Builder>, + ListDistributedAutonomousDatabasesRequest>() { + @Override + public ListDistributedAutonomousDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedAutonomousDatabasesRequest.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< + ListDistributedAutonomousDatabasesRequest, + ListDistributedAutonomousDatabasesResponse>() { + @Override + public ListDistributedAutonomousDatabasesResponse apply( + ListDistributedAutonomousDatabasesRequest request) { + return client.listDistributedAutonomousDatabases(request); + } + }, + new java.util.function.Function< + ListDistributedAutonomousDatabasesResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseSummary> + apply(ListDistributedAutonomousDatabasesResponse response) { + return response.getDistributedAutonomousDatabaseCollection().getItems(); + } + }); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceWaiters.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceWaiters.java new file mode 100644 index 0000000000..a9e1b8f648 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedAutonomousDbServiceWaiters.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of DistributedAutonomousDbService. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedAutonomousDbServiceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final DistributedAutonomousDbService client; + + public DistributedAutonomousDbServiceWaiters( + java.util.concurrent.ExecutorService executorService, + DistributedAutonomousDbService 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< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + forDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .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 forDistributedAutonomousDatabase( + 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< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + forDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .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 forDistributedAutonomousDatabase( + 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< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + forDistributedAutonomousDatabase( + GetDistributedAutonomousDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .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 forDistributedAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DistributedAutonomousDatabase. + private com.oracle.bmc.waiter.Waiter< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse> + forDistributedAutonomousDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDistributedAutonomousDatabaseRequest request, + final com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .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< + GetDistributedAutonomousDatabaseRequest, + GetDistributedAutonomousDatabaseResponse>() { + @Override + public GetDistributedAutonomousDatabaseResponse apply( + GetDistributedAutonomousDatabaseRequest request) { + return client.getDistributedAutonomousDatabase(request); + } + }, + new java.util.function.Predicate< + GetDistributedAutonomousDatabaseResponse>() { + @Override + public boolean test(GetDistributedAutonomousDatabaseResponse response) { + return targetStatesSet.contains( + response.getDistributedAutonomousDatabase() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase.LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointService.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointService.java new file mode 100644 index 0000000000..f262cfa325 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointService.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbPrivateEndpointService 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); + + /** + * Moves the DistributedDatabasePrivateEndpoint to 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 ChangeDistributedDatabasePrivateEndpointCompartment API. + */ + ChangeDistributedDatabasePrivateEndpointCompartmentResponse + changeDistributedDatabasePrivateEndpointCompartment( + ChangeDistributedDatabasePrivateEndpointCompartmentRequest request); + + /** + * Creates a DistributedDatabasePrivateEndpoint. + * + * @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 CreateDistributedDatabasePrivateEndpoint API. + */ + CreateDistributedDatabasePrivateEndpointResponse createDistributedDatabasePrivateEndpoint( + CreateDistributedDatabasePrivateEndpointRequest request); + + /** + * Deletes the given DistributedDatabasePrivateEndpoint. + * + * @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 DeleteDistributedDatabasePrivateEndpoint API. + */ + DeleteDistributedDatabasePrivateEndpointResponse deleteDistributedDatabasePrivateEndpoint( + DeleteDistributedDatabasePrivateEndpointRequest request); + + /** + * Get the DistributedDatabasePrivateEndpoint resource. + * + * @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 GetDistributedDatabasePrivateEndpoint API. + */ + GetDistributedDatabasePrivateEndpointResponse getDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request); + + /** + * List of DistributedDatabasePrivateEndpoints. + * + * @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 ListDistributedDatabasePrivateEndpoints API. + */ + ListDistributedDatabasePrivateEndpointsResponse listDistributedDatabasePrivateEndpoints( + ListDistributedDatabasePrivateEndpointsRequest request); + + /** + * Patch operation to update VCN network security group (NSG) IDs associated with the DistributedDatabasePrivateEndpoint. + * + * @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 PatchDistributedDatabasePrivateEndpoint API. + */ + PatchDistributedDatabasePrivateEndpointResponse patchDistributedDatabasePrivateEndpoint( + PatchDistributedDatabasePrivateEndpointRequest request); + + /** + * Reinstates the proxy instance associated with the DistributedDatabasePrivateEndpoint. + * + * @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 ReinstateProxyInstance API. + */ + ReinstateProxyInstanceResponse reinstateProxyInstance(ReinstateProxyInstanceRequest request); + + /** + * Updates the configuration of DistributedDatabasePrivateEndpoint. + * + * @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 UpdateDistributedDatabasePrivateEndpoint API. + */ + UpdateDistributedDatabasePrivateEndpointResponse updateDistributedDatabasePrivateEndpoint( + UpdateDistributedDatabasePrivateEndpointRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + DistributedDbPrivateEndpointServiceWaiters 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. + */ + DistributedDbPrivateEndpointServicePaginators getPaginators(); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsync.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsync.java new file mode 100644 index 0000000000..3e4ea24dea --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsync.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbPrivateEndpointServiceAsync 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); + + /** + * Moves the DistributedDatabasePrivateEndpoint to 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 + changeDistributedDatabasePrivateEndpointCompartment( + ChangeDistributedDatabasePrivateEndpointCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + handler); + + /** + * Creates a DistributedDatabasePrivateEndpoint. + * + * + * @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 + createDistributedDatabasePrivateEndpoint( + CreateDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabasePrivateEndpointRequest, + CreateDistributedDatabasePrivateEndpointResponse> + handler); + + /** + * Deletes the given DistributedDatabasePrivateEndpoint. + * + * + * @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 + deleteDistributedDatabasePrivateEndpoint( + DeleteDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabasePrivateEndpointRequest, + DeleteDistributedDatabasePrivateEndpointResponse> + handler); + + /** + * Get the DistributedDatabasePrivateEndpoint resource. + * + * + * @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 + getDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + handler); + + /** + * List of DistributedDatabasePrivateEndpoints. + * + * + * @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 + listDistributedDatabasePrivateEndpoints( + ListDistributedDatabasePrivateEndpointsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse> + handler); + + /** + * Patch operation to update VCN network security group (NSG) IDs associated with the DistributedDatabasePrivateEndpoint. + * + * + * @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 + patchDistributedDatabasePrivateEndpoint( + PatchDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabasePrivateEndpointRequest, + PatchDistributedDatabasePrivateEndpointResponse> + handler); + + /** + * Reinstates the proxy instance associated with the DistributedDatabasePrivateEndpoint. + * + * + * @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 reinstateProxyInstance( + ReinstateProxyInstanceRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReinstateProxyInstanceRequest, ReinstateProxyInstanceResponse> + handler); + + /** + * Updates the configuration of DistributedDatabasePrivateEndpoint. + * + * + * @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 + updateDistributedDatabasePrivateEndpoint( + UpdateDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabasePrivateEndpointRequest, + UpdateDistributedDatabasePrivateEndpointResponse> + handler); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsyncClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsyncClient.java new file mode 100644 index 0000000000..75fa749a71 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceAsyncClient.java @@ -0,0 +1,936 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for DistributedDbPrivateEndpointService 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbPrivateEndpointServiceAsyncClient + implements DistributedDbPrivateEndpointServiceAsync { + /** + * Service instance for DistributedDbPrivateEndpointService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbPrivateEndpointServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbPrivateEndpointServiceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public DistributedDbPrivateEndpointServiceAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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, DistributedDbPrivateEndpointServiceAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbPrivateEndpointServiceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbPrivateEndpointServiceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + changeDistributedDatabasePrivateEndpointCompartment( + ChangeDistributedDatabasePrivateEndpointCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + handler) { + LOG.trace("Called async changeDistributedDatabasePrivateEndpointCompartment"); + final ChangeDistributedDatabasePrivateEndpointCompartmentRequest interceptedRequest = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.interceptRequest( + request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ChangeDistributedDatabasePrivateEndpointCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/ChangeDistributedDatabasePrivateEndpointCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + transformer = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse>, + java.util.concurrent.Future< + ChangeDistributedDatabasePrivateEndpointCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeDistributedDatabasePrivateEndpointCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createDistributedDatabasePrivateEndpoint( + CreateDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabasePrivateEndpointRequest, + CreateDistributedDatabasePrivateEndpointResponse> + handler) { + LOG.trace("Called async createDistributedDatabasePrivateEndpoint"); + final CreateDistributedDatabasePrivateEndpointRequest interceptedRequest = + CreateDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "CreateDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateDistributedDatabasePrivateEndpointResponse> + transformer = + CreateDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabasePrivateEndpointRequest, + CreateDistributedDatabasePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabasePrivateEndpointRequest, + CreateDistributedDatabasePrivateEndpointResponse>, + java.util.concurrent.Future< + CreateDistributedDatabasePrivateEndpointResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getCreateDistributedDatabasePrivateEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDistributedDatabasePrivateEndpointRequest, + CreateDistributedDatabasePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteDistributedDatabasePrivateEndpoint( + DeleteDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabasePrivateEndpointRequest, + DeleteDistributedDatabasePrivateEndpointResponse> + handler) { + LOG.trace("Called async deleteDistributedDatabasePrivateEndpoint"); + final DeleteDistributedDatabasePrivateEndpointRequest interceptedRequest = + DeleteDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "DeleteDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/DeleteDistributedDatabasePrivateEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteDistributedDatabasePrivateEndpointResponse> + transformer = + DeleteDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabasePrivateEndpointRequest, + DeleteDistributedDatabasePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabasePrivateEndpointRequest, + DeleteDistributedDatabasePrivateEndpointResponse>, + java.util.concurrent.Future< + DeleteDistributedDatabasePrivateEndpointResponse>> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDistributedDatabasePrivateEndpointRequest, + DeleteDistributedDatabasePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + handler) { + LOG.trace("Called async getDistributedDatabasePrivateEndpoint"); + final GetDistributedDatabasePrivateEndpointRequest interceptedRequest = + GetDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "GetDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/GetDistributedDatabasePrivateEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabasePrivateEndpointResponse> + transformer = + GetDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDistributedDatabasePrivateEndpoints( + ListDistributedDatabasePrivateEndpointsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse> + handler) { + LOG.trace("Called async listDistributedDatabasePrivateEndpoints"); + final ListDistributedDatabasePrivateEndpointsRequest interceptedRequest = + ListDistributedDatabasePrivateEndpointsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedDatabasePrivateEndpointsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ListDistributedDatabasePrivateEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpointCollection/ListDistributedDatabasePrivateEndpoints"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDistributedDatabasePrivateEndpointsResponse> + transformer = + ListDistributedDatabasePrivateEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse>, + java.util.concurrent.Future< + ListDistributedDatabasePrivateEndpointsResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + patchDistributedDatabasePrivateEndpoint( + PatchDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabasePrivateEndpointRequest, + PatchDistributedDatabasePrivateEndpointResponse> + handler) { + LOG.trace("Called async patchDistributedDatabasePrivateEndpoint"); + final PatchDistributedDatabasePrivateEndpointRequest interceptedRequest = + PatchDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "PatchDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/PatchDistributedDatabasePrivateEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchDistributedDatabasePrivateEndpointResponse> + transformer = + PatchDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabasePrivateEndpointRequest, + PatchDistributedDatabasePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabasePrivateEndpointRequest, + PatchDistributedDatabasePrivateEndpointResponse>, + java.util.concurrent.Future< + PatchDistributedDatabasePrivateEndpointResponse>> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest + .getPatchDistributedDatabasePrivateEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchDistributedDatabasePrivateEndpointRequest, + PatchDistributedDatabasePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future reinstateProxyInstance( + ReinstateProxyInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReinstateProxyInstanceRequest, ReinstateProxyInstanceResponse> + handler) { + LOG.trace("Called async reinstateProxyInstance"); + final ReinstateProxyInstanceRequest interceptedRequest = + ReinstateProxyInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReinstateProxyInstanceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ReinstateProxyInstance", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/ReinstateProxyInstance"); + final java.util.function.Function + transformer = + ReinstateProxyInstanceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ReinstateProxyInstanceRequest, ReinstateProxyInstanceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReinstateProxyInstanceRequest, ReinstateProxyInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReinstateProxyInstanceRequest, ReinstateProxyInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateDistributedDatabasePrivateEndpoint( + UpdateDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabasePrivateEndpointRequest, + UpdateDistributedDatabasePrivateEndpointResponse> + handler) { + LOG.trace("Called async updateDistributedDatabasePrivateEndpoint"); + final UpdateDistributedDatabasePrivateEndpointRequest interceptedRequest = + UpdateDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "UpdateDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/UpdateDistributedDatabasePrivateEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateDistributedDatabasePrivateEndpointResponse> + transformer = + UpdateDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabasePrivateEndpointRequest, + UpdateDistributedDatabasePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabasePrivateEndpointRequest, + UpdateDistributedDatabasePrivateEndpointResponse>, + java.util.concurrent.Future< + UpdateDistributedDatabasePrivateEndpointResponse>> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest + .getUpdateDistributedDatabasePrivateEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDistributedDatabasePrivateEndpointRequest, + UpdateDistributedDatabasePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceClient.java new file mode 100644 index 0000000000..46cdd3633a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceClient.java @@ -0,0 +1,924 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbPrivateEndpointServiceClient + implements DistributedDbPrivateEndpointService { + /** + * Service instance for DistributedDbPrivateEndpointService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbPrivateEndpointServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbPrivateEndpointServiceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final DistributedDbPrivateEndpointServiceWaiters waiters; + + private final DistributedDbPrivateEndpointServicePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbPrivateEndpointServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbPrivateEndpointServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbPrivateEndpointServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbPrivateEndpointServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbPrivateEndpointServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbPrivateEndpointServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbPrivateEndpointServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public DistributedDbPrivateEndpointServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected DistributedDbPrivateEndpointServiceClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("DistributedDbPrivateEndpointService-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new DistributedDbPrivateEndpointServiceWaiters(executorService, this); + + this.paginators = new DistributedDbPrivateEndpointServicePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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, DistributedDbPrivateEndpointServiceClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbPrivateEndpointServiceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbPrivateEndpointServiceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public ChangeDistributedDatabasePrivateEndpointCompartmentResponse + changeDistributedDatabasePrivateEndpointCompartment( + ChangeDistributedDatabasePrivateEndpointCompartmentRequest request) { + LOG.trace("Called changeDistributedDatabasePrivateEndpointCompartment"); + final ChangeDistributedDatabasePrivateEndpointCompartmentRequest interceptedRequest = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ChangeDistributedDatabasePrivateEndpointCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/ChangeDistributedDatabasePrivateEndpointCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + transformer = + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDistributedDatabasePrivateEndpointCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDistributedDatabasePrivateEndpointResponse + createDistributedDatabasePrivateEndpoint( + CreateDistributedDatabasePrivateEndpointRequest request) { + LOG.trace("Called createDistributedDatabasePrivateEndpoint"); + final CreateDistributedDatabasePrivateEndpointRequest interceptedRequest = + CreateDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "CreateDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, CreateDistributedDatabasePrivateEndpointResponse> + transformer = + CreateDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateDistributedDatabasePrivateEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDistributedDatabasePrivateEndpointResponse + deleteDistributedDatabasePrivateEndpoint( + DeleteDistributedDatabasePrivateEndpointRequest request) { + LOG.trace("Called deleteDistributedDatabasePrivateEndpoint"); + final DeleteDistributedDatabasePrivateEndpointRequest interceptedRequest = + DeleteDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "DeleteDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/DeleteDistributedDatabasePrivateEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteDistributedDatabasePrivateEndpointResponse> + transformer = + DeleteDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedDatabasePrivateEndpointResponse getDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request) { + LOG.trace("Called getDistributedDatabasePrivateEndpoint"); + final GetDistributedDatabasePrivateEndpointRequest interceptedRequest = + GetDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "GetDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/GetDistributedDatabasePrivateEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabasePrivateEndpointResponse> + transformer = + GetDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDistributedDatabasePrivateEndpointsResponse listDistributedDatabasePrivateEndpoints( + ListDistributedDatabasePrivateEndpointsRequest request) { + LOG.trace("Called listDistributedDatabasePrivateEndpoints"); + final ListDistributedDatabasePrivateEndpointsRequest interceptedRequest = + ListDistributedDatabasePrivateEndpointsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedDatabasePrivateEndpointsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ListDistributedDatabasePrivateEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpointCollection/ListDistributedDatabasePrivateEndpoints"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDistributedDatabasePrivateEndpointsResponse> + transformer = + ListDistributedDatabasePrivateEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PatchDistributedDatabasePrivateEndpointResponse patchDistributedDatabasePrivateEndpoint( + PatchDistributedDatabasePrivateEndpointRequest request) { + LOG.trace("Called patchDistributedDatabasePrivateEndpoint"); + final PatchDistributedDatabasePrivateEndpointRequest interceptedRequest = + PatchDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "PatchDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/PatchDistributedDatabasePrivateEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, PatchDistributedDatabasePrivateEndpointResponse> + transformer = + PatchDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, + retriedRequest + .getPatchDistributedDatabasePrivateEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ReinstateProxyInstanceResponse reinstateProxyInstance( + ReinstateProxyInstanceRequest request) { + LOG.trace("Called reinstateProxyInstance"); + final ReinstateProxyInstanceRequest interceptedRequest = + ReinstateProxyInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReinstateProxyInstanceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "ReinstateProxyInstance", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/ReinstateProxyInstance"); + java.util.function.Function + transformer = + ReinstateProxyInstanceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDistributedDatabasePrivateEndpointResponse + updateDistributedDatabasePrivateEndpoint( + UpdateDistributedDatabasePrivateEndpointRequest request) { + LOG.trace("Called updateDistributedDatabasePrivateEndpoint"); + final UpdateDistributedDatabasePrivateEndpointRequest interceptedRequest = + UpdateDistributedDatabasePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedDatabasePrivateEndpointConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbPrivateEndpointService", + "UpdateDistributedDatabasePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabasePrivateEndpoint/UpdateDistributedDatabasePrivateEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateDistributedDatabasePrivateEndpointResponse> + transformer = + UpdateDistributedDatabasePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateDistributedDatabasePrivateEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DistributedDbPrivateEndpointServiceWaiters getWaiters() { + return waiters; + } + + @Override + public DistributedDbPrivateEndpointServicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServicePaginators.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServicePaginators.java new file mode 100644 index 0000000000..8c67f1940e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServicePaginators.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of DistributedDbPrivateEndpointService 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbPrivateEndpointServicePaginators { + private final DistributedDbPrivateEndpointService client; + + public DistributedDbPrivateEndpointServicePaginators( + DistributedDbPrivateEndpointService client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDistributedDatabasePrivateEndpoints 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 + listDistributedDatabasePrivateEndpointsResponseIterator( + final ListDistributedDatabasePrivateEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDistributedDatabasePrivateEndpointsRequest.Builder, + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse>( + new java.util.function.Supplier< + ListDistributedDatabasePrivateEndpointsRequest.Builder>() { + @Override + public ListDistributedDatabasePrivateEndpointsRequest.Builder get() { + return ListDistributedDatabasePrivateEndpointsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListDistributedDatabasePrivateEndpointsResponse, String>() { + @Override + public String apply(ListDistributedDatabasePrivateEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasePrivateEndpointsRequest.Builder>, + ListDistributedDatabasePrivateEndpointsRequest>() { + @Override + public ListDistributedDatabasePrivateEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasePrivateEndpointsRequest.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< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse>() { + @Override + public ListDistributedDatabasePrivateEndpointsResponse apply( + ListDistributedDatabasePrivateEndpointsRequest request) { + return client.listDistributedDatabasePrivateEndpoints(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpointSummary} objects + * contained in responses from the listDistributedDatabasePrivateEndpoints 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.distributeddatabasev26.model.DistributedDatabasePrivateEndpointSummary} objects + * contained in responses received from the service. + */ + public Iterable< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointSummary> + listDistributedDatabasePrivateEndpointsRecordIterator( + final ListDistributedDatabasePrivateEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDistributedDatabasePrivateEndpointsRequest.Builder, + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse, + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointSummary>( + new java.util.function.Supplier< + ListDistributedDatabasePrivateEndpointsRequest.Builder>() { + @Override + public ListDistributedDatabasePrivateEndpointsRequest.Builder get() { + return ListDistributedDatabasePrivateEndpointsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListDistributedDatabasePrivateEndpointsResponse, String>() { + @Override + public String apply(ListDistributedDatabasePrivateEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasePrivateEndpointsRequest.Builder>, + ListDistributedDatabasePrivateEndpointsRequest>() { + @Override + public ListDistributedDatabasePrivateEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasePrivateEndpointsRequest.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< + ListDistributedDatabasePrivateEndpointsRequest, + ListDistributedDatabasePrivateEndpointsResponse>() { + @Override + public ListDistributedDatabasePrivateEndpointsResponse apply( + ListDistributedDatabasePrivateEndpointsRequest request) { + return client.listDistributedDatabasePrivateEndpoints(request); + } + }, + new java.util.function.Function< + ListDistributedDatabasePrivateEndpointsResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointSummary> + apply(ListDistributedDatabasePrivateEndpointsResponse response) { + return response.getDistributedDatabasePrivateEndpointCollection() + .getItems(); + } + }); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceWaiters.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceWaiters.java new file mode 100644 index 0000000000..4a2c83b7ab --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbPrivateEndpointServiceWaiters.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of DistributedDbPrivateEndpointService. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbPrivateEndpointServiceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final DistributedDbPrivateEndpointService client; + + public DistributedDbPrivateEndpointServiceWaiters( + java.util.concurrent.ExecutorService executorService, + DistributedDbPrivateEndpointService 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< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + forDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .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 forDistributedDatabasePrivateEndpoint( + 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< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + forDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .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 forDistributedDatabasePrivateEndpoint( + 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< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + forDistributedDatabasePrivateEndpoint( + GetDistributedDatabasePrivateEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .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 forDistributedDatabasePrivateEndpoint( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DistributedDatabasePrivateEndpoint. + private com.oracle.bmc.waiter.Waiter< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse> + forDistributedDatabasePrivateEndpoint( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDistributedDatabasePrivateEndpointRequest request, + final com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint.LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint.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< + GetDistributedDatabasePrivateEndpointRequest, + GetDistributedDatabasePrivateEndpointResponse>() { + @Override + public GetDistributedDatabasePrivateEndpointResponse apply( + GetDistributedDatabasePrivateEndpointRequest request) { + return client.getDistributedDatabasePrivateEndpoint(request); + } + }, + new java.util.function.Predicate< + GetDistributedDatabasePrivateEndpointResponse>() { + @Override + public boolean test( + GetDistributedDatabasePrivateEndpointResponse response) { + return targetStatesSet.contains( + response.getDistributedDatabasePrivateEndpoint() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint.LifecycleState + .Deleted)), + request); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbService.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbService.java new file mode 100644 index 0000000000..60ffbc8140 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbService.java @@ -0,0 +1,389 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbService 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); + + /** + * Add new Global database services control(GDS CTL) node for the Globally distributed database. + * + * @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 AddDistributedDatabaseGdsControlNode API. + */ + AddDistributedDatabaseGdsControlNodeResponse addDistributedDatabaseGdsControlNode( + AddDistributedDatabaseGdsControlNodeRequest request); + + /** + * Move the Globally distributed database and its dependent resources to 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 ChangeDistributedDatabaseCompartment API. + */ + ChangeDistributedDatabaseCompartmentResponse changeDistributedDatabaseCompartment( + ChangeDistributedDatabaseCompartmentRequest request); + + /** + * Change the DbBackupConfig for the Globally distributed database. + * + * @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 ChangeDistributedDbBackupConfig API. + */ + ChangeDistributedDbBackupConfigResponse changeDistributedDbBackupConfig( + ChangeDistributedDbBackupConfigRequest request); + + /** + * Configure autoResourceManagement options for the Globally distributed database. + * + * @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 ConfigureDistributedDatabaseAutoResourceManagement API. + */ + ConfigureDistributedDatabaseAutoResourceManagementResponse + configureDistributedDatabaseAutoResourceManagement( + ConfigureDistributedDatabaseAutoResourceManagementRequest request); + + /** + * Configure new Global Service Manager(GSM aka shard manager) instances for the Globally distributed database. + * + * @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 ConfigureDistributedDatabaseGsms API. + */ + ConfigureDistributedDatabaseGsmsResponse configureDistributedDatabaseGsms( + ConfigureDistributedDatabaseGsmsRequest request); + + /** + * Once all components of Globally distributed database are provisioned, and signed GSM certificates are successfully uploaded, this + * api shall be invoked to configure sharding on the Globally distributed database. Note that this 'ConfigureSharding' API also needs to be + * invoked after successfully adding a new shard to the Globally distributed database using PATCH api. If this API is not + * invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of + * the Globally distributed database. + * + * @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 ConfigureDistributedDatabaseSharding API. + */ + ConfigureDistributedDatabaseShardingResponse configureDistributedDatabaseSharding( + ConfigureDistributedDatabaseShardingRequest request); + + /** + * Creates a Globally distributed database. + * + * @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 CreateDistributedDatabase API. + */ + CreateDistributedDatabaseResponse createDistributedDatabase( + CreateDistributedDatabaseRequest request); + + /** + * Terminate the given Globally distributed database. + * + * @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 DeleteDistributedDatabase API. + */ + DeleteDistributedDatabaseResponse deleteDistributedDatabase( + DeleteDistributedDatabaseRequest request); + + /** + * Generate the wallet associated with Globally distributed database. + * + * @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 GenerateDistributedDatabaseWallet API. + */ + GenerateDistributedDatabaseWalletResponse generateDistributedDatabaseWallet( + GenerateDistributedDatabaseWalletRequest request); + + /** + * Gets the details of the Globally distributed database identified by given 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 GetDistributedDatabase API. + */ + GetDistributedDatabaseResponse getDistributedDatabase(GetDistributedDatabaseRequest request); + + /** + * Operation to retrieve RAFT metrics for the Globally distributed database. If the Globally distributed database is not + * RAFT based then empty response is returned from the API. + * + * @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 GetDistributedDatabaseRaftMetric API. + */ + GetDistributedDatabaseRaftMetricResponse getDistributedDatabaseRaftMetric( + GetDistributedDatabaseRaftMetricRequest request); + + /** + * Operation to retrieve move RU invocation history and status for the Globally distributed database. + * Results are ordered by created timestamp in descending order. + * + * @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 GetDistributedDatabaseRuChangeLog API. + */ + GetDistributedDatabaseRuChangeLogResponse getDistributedDatabaseRuChangeLog( + GetDistributedDatabaseRuChangeLogRequest request); + + /** + * List of Globally distributed databases. + * + * @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 ListDistributedDatabases API. + */ + ListDistributedDatabasesResponse listDistributedDatabases( + ListDistributedDatabasesRequest request); + + /** + * Move the replication units for RAFT based globally distributed database from source shard to destination shard. + * + * @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 MoveDistributedDatabaseReplicationUnit API. + */ + MoveDistributedDatabaseReplicationUnitResponse moveDistributedDatabaseReplicationUnit( + MoveDistributedDatabaseReplicationUnitRequest request); + + /** + * Patch operation to add, remove or update shards to the Globally distributed database topology. In single patch + * operation, multiple shards can be either added, or removed or updated. Combination of inserts, update + * and remove in single operation is not allowed. + * + * @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 PatchDistributedDatabase API. + */ + PatchDistributedDatabaseResponse patchDistributedDatabase( + PatchDistributedDatabaseRequest request); + + /** + * Recreate the failed resource for the Globally Distributed Database. + * + * @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 RecreateFailedDistributedDatabaseResource API. + */ + RecreateFailedDistributedDatabaseResourceResponse recreateFailedDistributedDatabaseResource( + RecreateFailedDistributedDatabaseResourceRequest request); + + /** + * Rotate the gsmuser and gsmcatuser passwords for shards and catalog of the Globally distributed database. This operation will also remove GdsCtlNodes if present. + * @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 RotateDistributedDatabasePasswords API. + */ + RotateDistributedDatabasePasswordsResponse rotateDistributedDatabasePasswords( + RotateDistributedDatabasePasswordsRequest request); + + /** + * Scale global service manager(GSM aka shard manager) instances for the Globally distributed database. + * + * @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 ScaleDistributedDatabaseGsms API. + */ + ScaleDistributedDatabaseGsmsResponse scaleDistributedDatabaseGsms( + ScaleDistributedDatabaseGsmsRequest request); + + /** + * Start the shards, catalog, GSMs and GDSCTL instances of Globally distributed database. + * @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 StartDistributedDatabase API. + */ + StartDistributedDatabaseResponse startDistributedDatabase( + StartDistributedDatabaseRequest request); + + /** + * Stop the shards, catalog, GSMs and GDSCTL instances for the Globally distributed database. + * @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 StopDistributedDatabase API. + */ + StopDistributedDatabaseResponse stopDistributedDatabase(StopDistributedDatabaseRequest request); + + /** + * Updates the configuration of the Globally distributed database. + * + * @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 UpdateDistributedDatabase API. + */ + UpdateDistributedDatabaseResponse updateDistributedDatabase( + UpdateDistributedDatabaseRequest request); + + /** + * Validate the network connectivity between components of the globally distributed database. + * + * @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 ValidateDistributedDatabaseNetwork API. + */ + ValidateDistributedDatabaseNetworkResponse validateDistributedDatabaseNetwork( + ValidateDistributedDatabaseNetworkRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + DistributedDbServiceWaiters 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. + */ + DistributedDbServicePaginators getPaginators(); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsync.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsync.java new file mode 100644 index 0000000000..b2e55ac0f5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsync.java @@ -0,0 +1,466 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbServiceAsync 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); + + /** + * Add new Global database services control(GDS CTL) node for the Globally distributed database. + * + * + * @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 + addDistributedDatabaseGdsControlNode( + AddDistributedDatabaseGdsControlNodeRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddDistributedDatabaseGdsControlNodeRequest, + AddDistributedDatabaseGdsControlNodeResponse> + handler); + + /** + * Move the Globally distributed database and its dependent resources to 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 + changeDistributedDatabaseCompartment( + ChangeDistributedDatabaseCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabaseCompartmentRequest, + ChangeDistributedDatabaseCompartmentResponse> + handler); + + /** + * Change the DbBackupConfig for the Globally distributed database. + * + * + * @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 + changeDistributedDbBackupConfig( + ChangeDistributedDbBackupConfigRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDbBackupConfigRequest, + ChangeDistributedDbBackupConfigResponse> + handler); + + /** + * Configure autoResourceManagement options for the Globally distributed database. + * + * + * @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 + configureDistributedDatabaseAutoResourceManagement( + ConfigureDistributedDatabaseAutoResourceManagementRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + ConfigureDistributedDatabaseAutoResourceManagementResponse> + handler); + + /** + * Configure new Global Service Manager(GSM aka shard manager) instances for the Globally distributed database. + * + * + * @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 + configureDistributedDatabaseGsms( + ConfigureDistributedDatabaseGsmsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseGsmsRequest, + ConfigureDistributedDatabaseGsmsResponse> + handler); + + /** + * Once all components of Globally distributed database are provisioned, and signed GSM certificates are successfully uploaded, this + * api shall be invoked to configure sharding on the Globally distributed database. Note that this 'ConfigureSharding' API also needs to be + * invoked after successfully adding a new shard to the Globally distributed database using PATCH api. If this API is not + * invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of + * the Globally distributed database. + * + * + * @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 + configureDistributedDatabaseSharding( + ConfigureDistributedDatabaseShardingRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseShardingRequest, + ConfigureDistributedDatabaseShardingResponse> + handler); + + /** + * Creates a Globally distributed database. + * + * + * @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 createDistributedDatabase( + CreateDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabaseRequest, CreateDistributedDatabaseResponse> + handler); + + /** + * Terminate the given Globally distributed database. + * + * + * @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 deleteDistributedDatabase( + DeleteDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabaseRequest, DeleteDistributedDatabaseResponse> + handler); + + /** + * Generate the wallet associated with Globally distributed database. + * + * + * @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 + generateDistributedDatabaseWallet( + GenerateDistributedDatabaseWalletRequest request, + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedDatabaseWalletRequest, + GenerateDistributedDatabaseWalletResponse> + handler); + + /** + * Gets the details of the Globally distributed database identified by given 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 getDistributedDatabase( + GetDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + handler); + + /** + * Operation to retrieve RAFT metrics for the Globally distributed database. If the Globally distributed database is not + * RAFT based then empty response is returned from the API. + * + * + * @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 + getDistributedDatabaseRaftMetric( + GetDistributedDatabaseRaftMetricRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRaftMetricRequest, + GetDistributedDatabaseRaftMetricResponse> + handler); + + /** + * Operation to retrieve move RU invocation history and status for the Globally distributed database. + * Results are ordered by created timestamp in descending order. + * + * + * @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 + getDistributedDatabaseRuChangeLog( + GetDistributedDatabaseRuChangeLogRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRuChangeLogRequest, + GetDistributedDatabaseRuChangeLogResponse> + handler); + + /** + * List of Globally distributed databases. + * + * + * @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 listDistributedDatabases( + ListDistributedDatabasesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse> + handler); + + /** + * Move the replication units for RAFT based globally distributed database from source shard to destination shard. + * + * + * @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 + moveDistributedDatabaseReplicationUnit( + MoveDistributedDatabaseReplicationUnitRequest request, + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedDatabaseReplicationUnitRequest, + MoveDistributedDatabaseReplicationUnitResponse> + handler); + + /** + * Patch operation to add, remove or update shards to the Globally distributed database topology. In single patch + * operation, multiple shards can be either added, or removed or updated. Combination of inserts, update + * and remove in single operation is not allowed. + * + * + * @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 patchDistributedDatabase( + PatchDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabaseRequest, PatchDistributedDatabaseResponse> + handler); + + /** + * Recreate the failed resource for the Globally Distributed Database. + * + * + * @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 + recreateFailedDistributedDatabaseResource( + RecreateFailedDistributedDatabaseResourceRequest request, + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedDatabaseResourceRequest, + RecreateFailedDistributedDatabaseResourceResponse> + handler); + + /** + * Rotate the gsmuser and gsmcatuser passwords for shards and catalog of the Globally distributed database. This operation will also remove GdsCtlNodes if present. + * + * @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 + rotateDistributedDatabasePasswords( + RotateDistributedDatabasePasswordsRequest request, + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedDatabasePasswordsRequest, + RotateDistributedDatabasePasswordsResponse> + handler); + + /** + * Scale global service manager(GSM aka shard manager) instances for the Globally distributed database. + * + * + * @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 scaleDistributedDatabaseGsms( + ScaleDistributedDatabaseGsmsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedDatabaseGsmsRequest, + ScaleDistributedDatabaseGsmsResponse> + handler); + + /** + * Start the shards, catalog, GSMs and GDSCTL instances of Globally distributed database. + * + * @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 startDistributedDatabase( + StartDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StartDistributedDatabaseRequest, StartDistributedDatabaseResponse> + handler); + + /** + * Stop the shards, catalog, GSMs and GDSCTL instances for the Globally distributed database. + * + * @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 stopDistributedDatabase( + StopDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StopDistributedDatabaseRequest, StopDistributedDatabaseResponse> + handler); + + /** + * Updates the configuration of the Globally distributed database. + * + * + * @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 updateDistributedDatabase( + UpdateDistributedDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabaseRequest, UpdateDistributedDatabaseResponse> + handler); + + /** + * Validate the network connectivity between components of the globally distributed database. + * + * + * @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 + validateDistributedDatabaseNetwork( + ValidateDistributedDatabaseNetworkRequest request, + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedDatabaseNetworkRequest, + ValidateDistributedDatabaseNetworkResponse> + handler); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsyncClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsyncClient.java new file mode 100644 index 0000000000..8d9ff79a97 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceAsyncClient.java @@ -0,0 +1,1694 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for DistributedDbService 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbServiceAsyncClient implements DistributedDbServiceAsync { + /** + * Service instance for DistributedDbService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbServiceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public DistributedDbServiceAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "DistributedDbServiceAsyncClient", + "generateDistributedDatabaseWallet")); + } + } + + /** + * 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, DistributedDbServiceAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbServiceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbServiceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + addDistributedDatabaseGdsControlNode( + AddDistributedDatabaseGdsControlNodeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddDistributedDatabaseGdsControlNodeRequest, + AddDistributedDatabaseGdsControlNodeResponse> + handler) { + LOG.trace("Called async addDistributedDatabaseGdsControlNode"); + final AddDistributedDatabaseGdsControlNodeRequest interceptedRequest = + AddDistributedDatabaseGdsControlNodeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddDistributedDatabaseGdsControlNodeConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "AddDistributedDatabaseGdsControlNode", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/AddDistributedDatabaseGdsControlNode"); + final java.util.function.Function< + javax.ws.rs.core.Response, AddDistributedDatabaseGdsControlNodeResponse> + transformer = + AddDistributedDatabaseGdsControlNodeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + AddDistributedDatabaseGdsControlNodeRequest, + AddDistributedDatabaseGdsControlNodeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddDistributedDatabaseGdsControlNodeRequest, + AddDistributedDatabaseGdsControlNodeResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getAddDistributedDatabaseGdsControlNodeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddDistributedDatabaseGdsControlNodeRequest, + AddDistributedDatabaseGdsControlNodeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDistributedDatabaseCompartment( + ChangeDistributedDatabaseCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabaseCompartmentRequest, + ChangeDistributedDatabaseCompartmentResponse> + handler) { + LOG.trace("Called async changeDistributedDatabaseCompartment"); + final ChangeDistributedDatabaseCompartmentRequest interceptedRequest = + ChangeDistributedDatabaseCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ChangeDistributedDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ChangeDistributedDatabaseCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeDistributedDatabaseCompartmentResponse> + transformer = + ChangeDistributedDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabaseCompartmentRequest, + ChangeDistributedDatabaseCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDatabaseCompartmentRequest, + ChangeDistributedDatabaseCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeDistributedDatabaseCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDistributedDatabaseCompartmentRequest, + ChangeDistributedDatabaseCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDistributedDbBackupConfig( + ChangeDistributedDbBackupConfigRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDbBackupConfigRequest, + ChangeDistributedDbBackupConfigResponse> + handler) { + LOG.trace("Called async changeDistributedDbBackupConfig"); + final ChangeDistributedDbBackupConfigRequest interceptedRequest = + ChangeDistributedDbBackupConfigConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDbBackupConfigConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ChangeDistributedDbBackupConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ChangeDistributedDbBackupConfig"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeDistributedDbBackupConfigResponse> + transformer = + ChangeDistributedDbBackupConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDbBackupConfigRequest, + ChangeDistributedDbBackupConfigResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDistributedDbBackupConfigRequest, + ChangeDistributedDbBackupConfigResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeDistributedDbBackupConfigDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDistributedDbBackupConfigRequest, + ChangeDistributedDbBackupConfigResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedDatabaseAutoResourceManagement( + ConfigureDistributedDatabaseAutoResourceManagementRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + ConfigureDistributedDatabaseAutoResourceManagementResponse> + handler) { + LOG.trace("Called async configureDistributedDatabaseAutoResourceManagement"); + final ConfigureDistributedDatabaseAutoResourceManagementRequest interceptedRequest = + ConfigureDistributedDatabaseAutoResourceManagementConverter.interceptRequest( + request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseAutoResourceManagementConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseAutoResourceManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseAutoResourceManagement"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedDatabaseAutoResourceManagementResponse> + transformer = + ConfigureDistributedDatabaseAutoResourceManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + ConfigureDistributedDatabaseAutoResourceManagementResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + ConfigureDistributedDatabaseAutoResourceManagementResponse>, + java.util.concurrent.Future< + ConfigureDistributedDatabaseAutoResourceManagementResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConfigureDistributedDatabaseAutoResourceManagementDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + ConfigureDistributedDatabaseAutoResourceManagementResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedDatabaseGsms( + ConfigureDistributedDatabaseGsmsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseGsmsRequest, + ConfigureDistributedDatabaseGsmsResponse> + handler) { + LOG.trace("Called async configureDistributedDatabaseGsms"); + final ConfigureDistributedDatabaseGsmsRequest interceptedRequest = + ConfigureDistributedDatabaseGsmsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseGsmsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseGsms"); + final java.util.function.Function< + javax.ws.rs.core.Response, ConfigureDistributedDatabaseGsmsResponse> + transformer = + ConfigureDistributedDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseGsmsRequest, + ConfigureDistributedDatabaseGsmsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseGsmsRequest, + ConfigureDistributedDatabaseGsmsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getConfigureDistributedDatabaseGsmsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedDatabaseGsmsRequest, + ConfigureDistributedDatabaseGsmsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + configureDistributedDatabaseSharding( + ConfigureDistributedDatabaseShardingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseShardingRequest, + ConfigureDistributedDatabaseShardingResponse> + handler) { + LOG.trace("Called async configureDistributedDatabaseSharding"); + final ConfigureDistributedDatabaseShardingRequest interceptedRequest = + ConfigureDistributedDatabaseShardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseShardingConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseSharding", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseSharding"); + final java.util.function.Function< + javax.ws.rs.core.Response, ConfigureDistributedDatabaseShardingResponse> + transformer = + ConfigureDistributedDatabaseShardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseShardingRequest, + ConfigureDistributedDatabaseShardingResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureDistributedDatabaseShardingRequest, + ConfigureDistributedDatabaseShardingResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureDistributedDatabaseShardingRequest, + ConfigureDistributedDatabaseShardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createDistributedDatabase( + CreateDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabaseRequest, CreateDistributedDatabaseResponse> + handler) { + LOG.trace("Called async createDistributedDatabase"); + final CreateDistributedDatabaseRequest interceptedRequest = + CreateDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "CreateDistributedDatabase", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateDistributedDatabaseResponse> + transformer = + CreateDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabaseRequest, CreateDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDistributedDatabaseRequest, + CreateDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDistributedDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDistributedDatabaseRequest, CreateDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteDistributedDatabase( + DeleteDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabaseRequest, DeleteDistributedDatabaseResponse> + handler) { + LOG.trace("Called async deleteDistributedDatabase"); + final DeleteDistributedDatabaseRequest interceptedRequest = + DeleteDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "DeleteDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/DeleteDistributedDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteDistributedDatabaseResponse> + transformer = + DeleteDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabaseRequest, DeleteDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDistributedDatabaseRequest, + DeleteDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDistributedDatabaseRequest, DeleteDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + generateDistributedDatabaseWallet( + GenerateDistributedDatabaseWalletRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedDatabaseWalletRequest, + GenerateDistributedDatabaseWalletResponse> + handler) { + LOG.trace("Called async generateDistributedDatabaseWallet"); + final GenerateDistributedDatabaseWalletRequest interceptedRequest = + GenerateDistributedDatabaseWalletConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateDistributedDatabaseWalletConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GenerateDistributedDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GenerateDistributedDatabaseWallet"); + final java.util.function.Function< + javax.ws.rs.core.Response, GenerateDistributedDatabaseWalletResponse> + transformer = + GenerateDistributedDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedDatabaseWalletRequest, + GenerateDistributedDatabaseWalletResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GenerateDistributedDatabaseWalletRequest, + GenerateDistributedDatabaseWalletResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getGenerateDistributedDatabaseWalletDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GenerateDistributedDatabaseWalletRequest, + GenerateDistributedDatabaseWalletResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getDistributedDatabase( + GetDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + handler) { + LOG.trace("Called async getDistributedDatabase"); + final GetDistributedDatabaseRequest interceptedRequest = + GetDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabase"); + final java.util.function.Function + transformer = + GetDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedDatabaseRaftMetric( + GetDistributedDatabaseRaftMetricRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRaftMetricRequest, + GetDistributedDatabaseRaftMetricResponse> + handler) { + LOG.trace("Called async getDistributedDatabaseRaftMetric"); + final GetDistributedDatabaseRaftMetricRequest interceptedRequest = + GetDistributedDatabaseRaftMetricConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseRaftMetricConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabaseRaftMetric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabaseRaftMetric"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabaseRaftMetricResponse> + transformer = + GetDistributedDatabaseRaftMetricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRaftMetricRequest, + GetDistributedDatabaseRaftMetricResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRaftMetricRequest, + GetDistributedDatabaseRaftMetricResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedDatabaseRaftMetricRequest, + GetDistributedDatabaseRaftMetricResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDistributedDatabaseRuChangeLog( + GetDistributedDatabaseRuChangeLogRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRuChangeLogRequest, + GetDistributedDatabaseRuChangeLogResponse> + handler) { + LOG.trace("Called async getDistributedDatabaseRuChangeLog"); + final GetDistributedDatabaseRuChangeLogRequest interceptedRequest = + GetDistributedDatabaseRuChangeLogConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseRuChangeLogConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabaseRuChangeLog", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabaseRuChangeLog"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabaseRuChangeLogResponse> + transformer = + GetDistributedDatabaseRuChangeLogConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRuChangeLogRequest, + GetDistributedDatabaseRuChangeLogResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDistributedDatabaseRuChangeLogRequest, + GetDistributedDatabaseRuChangeLogResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDistributedDatabaseRuChangeLogRequest, + GetDistributedDatabaseRuChangeLogResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listDistributedDatabases( + ListDistributedDatabasesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse> + handler) { + LOG.trace("Called async listDistributedDatabases"); + final ListDistributedDatabasesRequest interceptedRequest = + ListDistributedDatabasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedDatabasesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ListDistributedDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabaseCollection/ListDistributedDatabases"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDistributedDatabasesResponse> + transformer = + ListDistributedDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + moveDistributedDatabaseReplicationUnit( + MoveDistributedDatabaseReplicationUnitRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MoveDistributedDatabaseReplicationUnitRequest, + MoveDistributedDatabaseReplicationUnitResponse> + handler) { + LOG.trace("Called async moveDistributedDatabaseReplicationUnit"); + final MoveDistributedDatabaseReplicationUnitRequest interceptedRequest = + MoveDistributedDatabaseReplicationUnitConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveDistributedDatabaseReplicationUnitConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "MoveDistributedDatabaseReplicationUnit", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/MoveDistributedDatabaseReplicationUnit"); + final java.util.function.Function< + javax.ws.rs.core.Response, MoveDistributedDatabaseReplicationUnitResponse> + transformer = + MoveDistributedDatabaseReplicationUnitConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedDatabaseReplicationUnitRequest, + MoveDistributedDatabaseReplicationUnitResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MoveDistributedDatabaseReplicationUnitRequest, + MoveDistributedDatabaseReplicationUnitResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getMoveDistributedDatabaseReplicationUnitDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MoveDistributedDatabaseReplicationUnitRequest, + MoveDistributedDatabaseReplicationUnitResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future patchDistributedDatabase( + PatchDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabaseRequest, PatchDistributedDatabaseResponse> + handler) { + LOG.trace("Called async patchDistributedDatabase"); + final PatchDistributedDatabaseRequest interceptedRequest = + PatchDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "PatchDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/PatchDistributedDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchDistributedDatabaseResponse> + transformer = + PatchDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabaseRequest, PatchDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchDistributedDatabaseRequest, PatchDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchDistributedDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchDistributedDatabaseRequest, PatchDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + recreateFailedDistributedDatabaseResource( + RecreateFailedDistributedDatabaseResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedDatabaseResourceRequest, + RecreateFailedDistributedDatabaseResourceResponse> + handler) { + LOG.trace("Called async recreateFailedDistributedDatabaseResource"); + final RecreateFailedDistributedDatabaseResourceRequest interceptedRequest = + RecreateFailedDistributedDatabaseResourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecreateFailedDistributedDatabaseResourceConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "RecreateFailedDistributedDatabaseResource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/RecreateFailedDistributedDatabaseResource"); + final java.util.function.Function< + javax.ws.rs.core.Response, + RecreateFailedDistributedDatabaseResourceResponse> + transformer = + RecreateFailedDistributedDatabaseResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedDatabaseResourceRequest, + RecreateFailedDistributedDatabaseResourceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RecreateFailedDistributedDatabaseResourceRequest, + RecreateFailedDistributedDatabaseResourceResponse>, + java.util.concurrent.Future< + RecreateFailedDistributedDatabaseResourceResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RecreateFailedDistributedDatabaseResourceRequest, + RecreateFailedDistributedDatabaseResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + rotateDistributedDatabasePasswords( + RotateDistributedDatabasePasswordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RotateDistributedDatabasePasswordsRequest, + RotateDistributedDatabasePasswordsResponse> + handler) { + LOG.trace("Called async rotateDistributedDatabasePasswords"); + final RotateDistributedDatabasePasswordsRequest interceptedRequest = + RotateDistributedDatabasePasswordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RotateDistributedDatabasePasswordsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "RotateDistributedDatabasePasswords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/RotateDistributedDatabasePasswords"); + final java.util.function.Function< + javax.ws.rs.core.Response, RotateDistributedDatabasePasswordsResponse> + transformer = + RotateDistributedDatabasePasswordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedDatabasePasswordsRequest, + RotateDistributedDatabasePasswordsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RotateDistributedDatabasePasswordsRequest, + RotateDistributedDatabasePasswordsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRotateDistributedDatabasePasswordsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RotateDistributedDatabasePasswordsRequest, + RotateDistributedDatabasePasswordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + scaleDistributedDatabaseGsms( + ScaleDistributedDatabaseGsmsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedDatabaseGsmsRequest, + ScaleDistributedDatabaseGsmsResponse> + handler) { + LOG.trace("Called async scaleDistributedDatabaseGsms"); + final ScaleDistributedDatabaseGsmsRequest interceptedRequest = + ScaleDistributedDatabaseGsmsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScaleDistributedDatabaseGsmsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ScaleDistributedDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ScaleDistributedDatabaseGsms"); + final java.util.function.Function< + javax.ws.rs.core.Response, ScaleDistributedDatabaseGsmsResponse> + transformer = + ScaleDistributedDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedDatabaseGsmsRequest, ScaleDistributedDatabaseGsmsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ScaleDistributedDatabaseGsmsRequest, + ScaleDistributedDatabaseGsmsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getScaleDistributedDatabaseGsmsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ScaleDistributedDatabaseGsmsRequest, ScaleDistributedDatabaseGsmsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future startDistributedDatabase( + StartDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StartDistributedDatabaseRequest, StartDistributedDatabaseResponse> + handler) { + LOG.trace("Called async startDistributedDatabase"); + final StartDistributedDatabaseRequest interceptedRequest = + StartDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "StartDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/StartDistributedDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, StartDistributedDatabaseResponse> + transformer = + StartDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StartDistributedDatabaseRequest, StartDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StartDistributedDatabaseRequest, StartDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StartDistributedDatabaseRequest, StartDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future stopDistributedDatabase( + StopDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StopDistributedDatabaseRequest, StopDistributedDatabaseResponse> + handler) { + LOG.trace("Called async stopDistributedDatabase"); + final StopDistributedDatabaseRequest interceptedRequest = + StopDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "StopDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/StopDistributedDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, StopDistributedDatabaseResponse> + transformer = + StopDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StopDistributedDatabaseRequest, StopDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StopDistributedDatabaseRequest, StopDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StopDistributedDatabaseRequest, StopDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateDistributedDatabase( + UpdateDistributedDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabaseRequest, UpdateDistributedDatabaseResponse> + handler) { + LOG.trace("Called async updateDistributedDatabase"); + final UpdateDistributedDatabaseRequest interceptedRequest = + UpdateDistributedDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "UpdateDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/UpdateDistributedDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateDistributedDatabaseResponse> + transformer = + UpdateDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabaseRequest, UpdateDistributedDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDistributedDatabaseRequest, + UpdateDistributedDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDistributedDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDistributedDatabaseRequest, UpdateDistributedDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + validateDistributedDatabaseNetwork( + ValidateDistributedDatabaseNetworkRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedDatabaseNetworkRequest, + ValidateDistributedDatabaseNetworkResponse> + handler) { + LOG.trace("Called async validateDistributedDatabaseNetwork"); + final ValidateDistributedDatabaseNetworkRequest interceptedRequest = + ValidateDistributedDatabaseNetworkConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedDatabaseNetworkConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ValidateDistributedDatabaseNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ValidateDistributedDatabaseNetwork"); + final java.util.function.Function< + javax.ws.rs.core.Response, ValidateDistributedDatabaseNetworkResponse> + transformer = + ValidateDistributedDatabaseNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedDatabaseNetworkRequest, + ValidateDistributedDatabaseNetworkResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ValidateDistributedDatabaseNetworkRequest, + ValidateDistributedDatabaseNetworkResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ValidateDistributedDatabaseNetworkRequest, + ValidateDistributedDatabaseNetworkResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceClient.java new file mode 100644 index 0000000000..b402ab81a1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceClient.java @@ -0,0 +1,1518 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbServiceClient implements DistributedDbService { + /** + * Service instance for DistributedDbService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbServiceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final DistributedDbServiceWaiters waiters; + + private final DistributedDbServicePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public DistributedDbServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected DistributedDbServiceClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("DistributedDbService-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new DistributedDbServiceWaiters(executorService, this); + + this.paginators = new DistributedDbServicePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "DistributedDbServiceClient", "generateDistributedDatabaseWallet")); + } + } + + /** + * 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, DistributedDbServiceClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbServiceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbServiceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public AddDistributedDatabaseGdsControlNodeResponse addDistributedDatabaseGdsControlNode( + AddDistributedDatabaseGdsControlNodeRequest request) { + LOG.trace("Called addDistributedDatabaseGdsControlNode"); + final AddDistributedDatabaseGdsControlNodeRequest interceptedRequest = + AddDistributedDatabaseGdsControlNodeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddDistributedDatabaseGdsControlNodeConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "AddDistributedDatabaseGdsControlNode", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/AddDistributedDatabaseGdsControlNode"); + java.util.function.Function< + javax.ws.rs.core.Response, AddDistributedDatabaseGdsControlNodeResponse> + transformer = + AddDistributedDatabaseGdsControlNodeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getAddDistributedDatabaseGdsControlNodeDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDistributedDatabaseCompartmentResponse changeDistributedDatabaseCompartment( + ChangeDistributedDatabaseCompartmentRequest request) { + LOG.trace("Called changeDistributedDatabaseCompartment"); + final ChangeDistributedDatabaseCompartmentRequest interceptedRequest = + ChangeDistributedDatabaseCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ChangeDistributedDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ChangeDistributedDatabaseCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeDistributedDatabaseCompartmentResponse> + transformer = + ChangeDistributedDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDistributedDatabaseCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDistributedDbBackupConfigResponse changeDistributedDbBackupConfig( + ChangeDistributedDbBackupConfigRequest request) { + LOG.trace("Called changeDistributedDbBackupConfig"); + final ChangeDistributedDbBackupConfigRequest interceptedRequest = + ChangeDistributedDbBackupConfigConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDistributedDbBackupConfigConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ChangeDistributedDbBackupConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ChangeDistributedDbBackupConfig"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeDistributedDbBackupConfigResponse> + transformer = + ChangeDistributedDbBackupConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDistributedDbBackupConfigDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedDatabaseAutoResourceManagementResponse + configureDistributedDatabaseAutoResourceManagement( + ConfigureDistributedDatabaseAutoResourceManagementRequest request) { + LOG.trace("Called configureDistributedDatabaseAutoResourceManagement"); + final ConfigureDistributedDatabaseAutoResourceManagementRequest interceptedRequest = + ConfigureDistributedDatabaseAutoResourceManagementConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseAutoResourceManagementConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseAutoResourceManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseAutoResourceManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConfigureDistributedDatabaseAutoResourceManagementResponse> + transformer = + ConfigureDistributedDatabaseAutoResourceManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureDistributedDatabaseAutoResourceManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedDatabaseGsmsResponse configureDistributedDatabaseGsms( + ConfigureDistributedDatabaseGsmsRequest request) { + LOG.trace("Called configureDistributedDatabaseGsms"); + final ConfigureDistributedDatabaseGsmsRequest interceptedRequest = + ConfigureDistributedDatabaseGsmsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseGsmsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseGsms"); + java.util.function.Function< + javax.ws.rs.core.Response, ConfigureDistributedDatabaseGsmsResponse> + transformer = + ConfigureDistributedDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureDistributedDatabaseGsmsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfigureDistributedDatabaseShardingResponse configureDistributedDatabaseSharding( + ConfigureDistributedDatabaseShardingRequest request) { + LOG.trace("Called configureDistributedDatabaseSharding"); + final ConfigureDistributedDatabaseShardingRequest interceptedRequest = + ConfigureDistributedDatabaseShardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureDistributedDatabaseShardingConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ConfigureDistributedDatabaseSharding", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ConfigureDistributedDatabaseSharding"); + java.util.function.Function< + javax.ws.rs.core.Response, ConfigureDistributedDatabaseShardingResponse> + transformer = + ConfigureDistributedDatabaseShardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDistributedDatabaseResponse createDistributedDatabase( + CreateDistributedDatabaseRequest request) { + LOG.trace("Called createDistributedDatabase"); + final CreateDistributedDatabaseRequest interceptedRequest = + CreateDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "CreateDistributedDatabase", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateDistributedDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDistributedDatabaseResponse deleteDistributedDatabase( + DeleteDistributedDatabaseRequest request) { + LOG.trace("Called deleteDistributedDatabase"); + final DeleteDistributedDatabaseRequest interceptedRequest = + DeleteDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "DeleteDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/DeleteDistributedDatabase"); + java.util.function.Function + transformer = + DeleteDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateDistributedDatabaseWalletResponse generateDistributedDatabaseWallet( + GenerateDistributedDatabaseWalletRequest request) { + LOG.trace("Called generateDistributedDatabaseWallet"); + final GenerateDistributedDatabaseWalletRequest interceptedRequest = + GenerateDistributedDatabaseWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateDistributedDatabaseWalletConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GenerateDistributedDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GenerateDistributedDatabaseWallet"); + java.util.function.Function< + javax.ws.rs.core.Response, GenerateDistributedDatabaseWalletResponse> + transformer = + GenerateDistributedDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateDistributedDatabaseWalletDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedDatabaseResponse getDistributedDatabase( + GetDistributedDatabaseRequest request) { + LOG.trace("Called getDistributedDatabase"); + final GetDistributedDatabaseRequest interceptedRequest = + GetDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabase"); + java.util.function.Function + transformer = + GetDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedDatabaseRaftMetricResponse getDistributedDatabaseRaftMetric( + GetDistributedDatabaseRaftMetricRequest request) { + LOG.trace("Called getDistributedDatabaseRaftMetric"); + final GetDistributedDatabaseRaftMetricRequest interceptedRequest = + GetDistributedDatabaseRaftMetricConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseRaftMetricConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabaseRaftMetric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabaseRaftMetric"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabaseRaftMetricResponse> + transformer = + GetDistributedDatabaseRaftMetricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDistributedDatabaseRuChangeLogResponse getDistributedDatabaseRuChangeLog( + GetDistributedDatabaseRuChangeLogRequest request) { + LOG.trace("Called getDistributedDatabaseRuChangeLog"); + final GetDistributedDatabaseRuChangeLogRequest interceptedRequest = + GetDistributedDatabaseRuChangeLogConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDistributedDatabaseRuChangeLogConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "GetDistributedDatabaseRuChangeLog", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/GetDistributedDatabaseRuChangeLog"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDistributedDatabaseRuChangeLogResponse> + transformer = + GetDistributedDatabaseRuChangeLogConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDistributedDatabasesResponse listDistributedDatabases( + ListDistributedDatabasesRequest request) { + LOG.trace("Called listDistributedDatabases"); + final ListDistributedDatabasesRequest interceptedRequest = + ListDistributedDatabasesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDistributedDatabasesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ListDistributedDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabaseCollection/ListDistributedDatabases"); + java.util.function.Function + transformer = + ListDistributedDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public MoveDistributedDatabaseReplicationUnitResponse moveDistributedDatabaseReplicationUnit( + MoveDistributedDatabaseReplicationUnitRequest request) { + LOG.trace("Called moveDistributedDatabaseReplicationUnit"); + final MoveDistributedDatabaseReplicationUnitRequest interceptedRequest = + MoveDistributedDatabaseReplicationUnitConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveDistributedDatabaseReplicationUnitConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "MoveDistributedDatabaseReplicationUnit", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/MoveDistributedDatabaseReplicationUnit"); + java.util.function.Function< + javax.ws.rs.core.Response, MoveDistributedDatabaseReplicationUnitResponse> + transformer = + MoveDistributedDatabaseReplicationUnitConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getMoveDistributedDatabaseReplicationUnitDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PatchDistributedDatabaseResponse patchDistributedDatabase( + PatchDistributedDatabaseRequest request) { + LOG.trace("Called patchDistributedDatabase"); + final PatchDistributedDatabaseRequest interceptedRequest = + PatchDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "PatchDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/PatchDistributedDatabase"); + java.util.function.Function + transformer = + PatchDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, + retriedRequest.getPatchDistributedDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RecreateFailedDistributedDatabaseResourceResponse + recreateFailedDistributedDatabaseResource( + RecreateFailedDistributedDatabaseResourceRequest request) { + LOG.trace("Called recreateFailedDistributedDatabaseResource"); + final RecreateFailedDistributedDatabaseResourceRequest interceptedRequest = + RecreateFailedDistributedDatabaseResourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecreateFailedDistributedDatabaseResourceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "RecreateFailedDistributedDatabaseResource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/RecreateFailedDistributedDatabaseResource"); + java.util.function.Function< + javax.ws.rs.core.Response, + RecreateFailedDistributedDatabaseResourceResponse> + transformer = + RecreateFailedDistributedDatabaseResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RotateDistributedDatabasePasswordsResponse rotateDistributedDatabasePasswords( + RotateDistributedDatabasePasswordsRequest request) { + LOG.trace("Called rotateDistributedDatabasePasswords"); + final RotateDistributedDatabasePasswordsRequest interceptedRequest = + RotateDistributedDatabasePasswordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RotateDistributedDatabasePasswordsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "RotateDistributedDatabasePasswords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/RotateDistributedDatabasePasswords"); + java.util.function.Function< + javax.ws.rs.core.Response, RotateDistributedDatabasePasswordsResponse> + transformer = + RotateDistributedDatabasePasswordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRotateDistributedDatabasePasswordsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ScaleDistributedDatabaseGsmsResponse scaleDistributedDatabaseGsms( + ScaleDistributedDatabaseGsmsRequest request) { + LOG.trace("Called scaleDistributedDatabaseGsms"); + final ScaleDistributedDatabaseGsmsRequest interceptedRequest = + ScaleDistributedDatabaseGsmsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScaleDistributedDatabaseGsmsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ScaleDistributedDatabaseGsms", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ScaleDistributedDatabaseGsms"); + java.util.function.Function + transformer = + ScaleDistributedDatabaseGsmsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getScaleDistributedDatabaseGsmsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StartDistributedDatabaseResponse startDistributedDatabase( + StartDistributedDatabaseRequest request) { + LOG.trace("Called startDistributedDatabase"); + final StartDistributedDatabaseRequest interceptedRequest = + StartDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "StartDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/StartDistributedDatabase"); + java.util.function.Function + transformer = + StartDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StopDistributedDatabaseResponse stopDistributedDatabase( + StopDistributedDatabaseRequest request) { + LOG.trace("Called stopDistributedDatabase"); + final StopDistributedDatabaseRequest interceptedRequest = + StopDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "StopDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/StopDistributedDatabase"); + java.util.function.Function + transformer = + StopDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDistributedDatabaseResponse updateDistributedDatabase( + UpdateDistributedDatabaseRequest request) { + LOG.trace("Called updateDistributedDatabase"); + final UpdateDistributedDatabaseRequest interceptedRequest = + UpdateDistributedDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDistributedDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "UpdateDistributedDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/UpdateDistributedDatabase"); + java.util.function.Function + transformer = + UpdateDistributedDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateDistributedDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ValidateDistributedDatabaseNetworkResponse validateDistributedDatabaseNetwork( + ValidateDistributedDatabaseNetworkRequest request) { + LOG.trace("Called validateDistributedDatabaseNetwork"); + final ValidateDistributedDatabaseNetworkRequest interceptedRequest = + ValidateDistributedDatabaseNetworkConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ValidateDistributedDatabaseNetworkConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbService", + "ValidateDistributedDatabaseNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/DistributedDatabase/ValidateDistributedDatabaseNetwork"); + java.util.function.Function< + javax.ws.rs.core.Response, ValidateDistributedDatabaseNetworkResponse> + transformer = + ValidateDistributedDatabaseNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DistributedDbServiceWaiters getWaiters() { + return waiters; + } + + @Override + public DistributedDbServicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServicePaginators.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServicePaginators.java new file mode 100644 index 0000000000..09e38c765a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServicePaginators.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of DistributedDbService 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbServicePaginators { + private final DistributedDbService client; + + public DistributedDbServicePaginators(DistributedDbService client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDistributedDatabases 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 listDistributedDatabasesResponseIterator( + final ListDistributedDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDistributedDatabasesRequest.Builder, ListDistributedDatabasesRequest, + ListDistributedDatabasesResponse>( + new java.util.function.Supplier() { + @Override + public ListDistributedDatabasesRequest.Builder get() { + return ListDistributedDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDistributedDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasesRequest.Builder>, + ListDistributedDatabasesRequest>() { + @Override + public ListDistributedDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasesRequest.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< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse>() { + @Override + public ListDistributedDatabasesResponse apply( + ListDistributedDatabasesRequest request) { + return client.listDistributedDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseSummary} objects + * contained in responses from the listDistributedDatabases 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.distributeddatabasev26.model.DistributedDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDistributedDatabasesRecordIterator(final ListDistributedDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDistributedDatabasesRequest.Builder, ListDistributedDatabasesRequest, + ListDistributedDatabasesResponse, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseSummary>( + new java.util.function.Supplier() { + @Override + public ListDistributedDatabasesRequest.Builder get() { + return ListDistributedDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDistributedDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasesRequest.Builder>, + ListDistributedDatabasesRequest>() { + @Override + public ListDistributedDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDistributedDatabasesRequest.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< + ListDistributedDatabasesRequest, ListDistributedDatabasesResponse>() { + @Override + public ListDistributedDatabasesResponse apply( + ListDistributedDatabasesRequest request) { + return client.listDistributedDatabases(request); + } + }, + new java.util.function.Function< + ListDistributedDatabasesResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseSummary> + apply(ListDistributedDatabasesResponse response) { + return response.getDistributedDatabaseCollection().getItems(); + } + }); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceWaiters.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceWaiters.java new file mode 100644 index 0000000000..c5d11d9e6f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbServiceWaiters.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of DistributedDbService. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbServiceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final DistributedDbService client; + + public DistributedDbServiceWaiters( + java.util.concurrent.ExecutorService executorService, DistributedDbService 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< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + forDistributedDatabase( + GetDistributedDatabaseRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + .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 forDistributedDatabase( + 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< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + forDistributedDatabase( + GetDistributedDatabaseRequest request, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase.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 forDistributedDatabase( + 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< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + forDistributedDatabase( + GetDistributedDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + .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 forDistributedDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DistributedDatabase. + private com.oracle.bmc.waiter.Waiter< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse> + forDistributedDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDistributedDatabaseRequest request, + final com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + .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< + GetDistributedDatabaseRequest, GetDistributedDatabaseResponse>() { + @Override + public GetDistributedDatabaseResponse apply( + GetDistributedDatabaseRequest request) { + return client.getDistributedDatabase(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDistributedDatabaseResponse response) { + return targetStatesSet.contains( + response.getDistributedDatabase().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + .LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestService.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestService.java new file mode 100644 index 0000000000..c4a8717a8c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestService.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbWorkRequestService 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); + + /** + * Gets details of the work request with the given 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 GetWorkRequest API. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + + /** + * Returns a (paginated) list of errors for the work request with the given 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 ListWorkRequestErrors API. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request); + + /** + * Returns a (paginated) list of logs for the work request with the given 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 ListWorkRequestLogs API. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest 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 ListWorkRequests API. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + DistributedDbWorkRequestServiceWaiters 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. + */ + DistributedDbWorkRequestServicePaginators getPaginators(); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsync.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsync.java new file mode 100644 index 0000000000..03c3e8aa9d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsync.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public interface DistributedDbWorkRequestServiceAsync 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); + + /** + * Gets details of the work request with the given 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 getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a (paginated) list of errors for the work request with the given 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 listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler); + + /** + * Returns a (paginated) list of logs for the work request with the given 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 listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + 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 listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsyncClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsyncClient.java new file mode 100644 index 0000000000..aa29fa7b6c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceAsyncClient.java @@ -0,0 +1,658 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for DistributedDbWorkRequestService 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbWorkRequestServiceAsyncClient + implements DistributedDbWorkRequestServiceAsync { + /** + * Service instance for DistributedDbWorkRequestService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbWorkRequestServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbWorkRequestServiceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbWorkRequestServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbWorkRequestServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbWorkRequestServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbWorkRequestServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbWorkRequestServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbWorkRequestServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbWorkRequestServiceAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public DistributedDbWorkRequestServiceAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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, DistributedDbWorkRequestServiceAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbWorkRequestServiceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbWorkRequestServiceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> + handler) { + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequest/GetWorkRequest"); + final java.util.function.Function + transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestRequest, GetWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequestError/ListWorkRequestErrors"); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequestLogEntry/ListWorkRequestLogs"); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequest/ListWorkRequests"); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceClient.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceClient.java new file mode 100644 index 0000000000..6f1b2ec5b5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceClient.java @@ -0,0 +1,718 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.internal.http.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbWorkRequestServiceClient implements DistributedDbWorkRequestService { + /** + * Service instance for DistributedDbWorkRequestService. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(DistributedDbWorkRequestServiceClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://globaldb.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DistributedDbWorkRequestServiceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final DistributedDbWorkRequestServiceWaiters waiters; + + private final DistributedDbWorkRequestServicePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DistributedDbWorkRequestServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DistributedDbWorkRequestServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DistributedDbWorkRequestServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DistributedDbWorkRequestServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DistributedDbWorkRequestServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbWorkRequestServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DistributedDbWorkRequestServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public DistributedDbWorkRequestServiceClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected DistributedDbWorkRequestServiceClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("DistributedDbWorkRequestService-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new DistributedDbWorkRequestServiceWaiters(executorService, this); + + this.paginators = new DistributedDbWorkRequestServicePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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, DistributedDbWorkRequestServiceClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 DistributedDbWorkRequestServiceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DistributedDbWorkRequestServiceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequest/GetWorkRequest"); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequestError/ListWorkRequestErrors"); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequestLogEntry/ListWorkRequestLogs"); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DistributedDbWorkRequestService", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/globally-distributed-database/20260101/WorkRequest/ListWorkRequests"); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DistributedDbWorkRequestServiceWaiters getWaiters() { + return waiters; + } + + @Override + public DistributedDbWorkRequestServicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServicePaginators.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServicePaginators.java new file mode 100644 index 0000000000..974a55128d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServicePaginators.java @@ -0,0 +1,384 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of DistributedDbWorkRequestService 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbWorkRequestServicePaginators { + private final DistributedDbWorkRequestService client; + + public DistributedDbWorkRequestServicePaginators(DistributedDbWorkRequestService client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors 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 listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.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< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors 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.distributeddatabasev26.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestErrorsRecordIterator(final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.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< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListWorkRequestErrorsResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model.WorkRequestError>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model.WorkRequestError> + apply(ListWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs 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 listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.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< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs 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.distributeddatabasev26.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.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< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestLogEntry>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntry> + apply(ListWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests 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 listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.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< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests 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.distributeddatabasev26.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestsRecordIterator(final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.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< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new java.util.function.Function< + ListWorkRequestsResponse, + java.util.List< + com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummary> + apply(ListWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceWaiters.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceWaiters.java new file mode 100644 index 0000000000..e875f04fa2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/DistributedDbWorkRequestServiceWaiters.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of DistributedDbWorkRequestService. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DistributedDbWorkRequestServiceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final DistributedDbWorkRequestService client; + + public DistributedDbWorkRequestServiceWaiters( + java.util.concurrent.ExecutorService executorService, + DistributedDbWorkRequestService client) { + this.executorService = executorService; + this.client = client; + } + + /** + * 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 + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(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 + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/SdkClientsMetadata.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/SdkClientsMetadata.java new file mode 100644 index 0000000000..d8d4422f58 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/SdkClientsMetadata.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@SdkClients({ + DistributedAutonomousDbServiceAsyncClient.class, + DistributedAutonomousDbServiceClient.class, + DistributedDbPrivateEndpointServiceAsyncClient.class, + DistributedDbPrivateEndpointServiceClient.class, + DistributedDbServiceAsyncClient.class, + DistributedDbServiceClient.class, + DistributedDbWorkRequestServiceAsyncClient.class, + DistributedDbWorkRequestServiceClient.class +}) +public final class SdkClientsMetadata {} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedAutonomousDatabaseGdsControlNodeConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedAutonomousDatabaseGdsControlNodeConverter.java new file mode 100644 index 0000000000..6a009de041 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedAutonomousDatabaseGdsControlNodeConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedAutonomousDatabaseGdsControlNodeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + AddDistributedAutonomousDatabaseGdsControlNodeConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedAutonomousDatabaseGdsControlNodeRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedAutonomousDatabaseGdsControlNodeRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedAutonomousDatabaseGdsControlNodeRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getAddDistributedAutonomousDatabaseGdsControlNodeDetails(), + "addDistributedAutonomousDatabaseGdsControlNodeDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("addGdsControlNode"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.AddDistributedAutonomousDatabaseGdsControlNodeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedAutonomousDatabaseGdsControlNodeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedDatabaseGdsControlNodeConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedDatabaseGdsControlNodeConverter.java new file mode 100644 index 0000000000..9b69c8bb28 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/AddDistributedDatabaseGdsControlNodeConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedDatabaseGdsControlNodeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddDistributedDatabaseGdsControlNodeConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedDatabaseGdsControlNodeRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedDatabaseGdsControlNodeRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .AddDistributedDatabaseGdsControlNodeRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getAddDistributedDatabaseGdsControlNodeDetails(), + "addDistributedDatabaseGdsControlNodeDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("addGdsControlNode"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.AddDistributedDatabaseGdsControlNodeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .AddDistributedDatabaseGdsControlNodeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDatabaseCompartmentConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDatabaseCompartmentConverter.java new file mode 100644 index 0000000000..ab09a366bd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDatabaseCompartmentConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDatabaseCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeDistributedAutonomousDatabaseCompartmentConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDatabaseCompartmentRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDatabaseCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDatabaseCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeDistributedAutonomousDatabaseCompartmentDetails(), + "changeDistributedAutonomousDatabaseCompartmentDetails is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ChangeDistributedAutonomousDatabaseCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDatabaseCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDbBackupConfigConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDbBackupConfigConverter.java new file mode 100644 index 0000000000..806a7b23ea --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedAutonomousDbBackupConfigConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDbBackupConfigConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeDistributedAutonomousDbBackupConfigConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDbBackupConfigRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDbBackupConfigRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedAutonomousDbBackupConfigRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getChangeDistributedAutonomousDbBackupConfigDetails(), + "changeDistributedAutonomousDbBackupConfigDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("changeDbBackupConfig"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ChangeDistributedAutonomousDbBackupConfigResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedAutonomousDbBackupConfigResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabaseCompartmentConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabaseCompartmentConverter.java new file mode 100644 index 0000000000..058d16d16e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabaseCompartmentConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabaseCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeDistributedDatabaseCompartmentConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabaseCompartmentRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabaseCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabaseCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeDistributedDatabaseCompartmentDetails(), + "changeDistributedDatabaseCompartmentDetails is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ChangeDistributedDatabaseCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabaseCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabasePrivateEndpointCompartmentConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabasePrivateEndpointCompartmentConverter.java new file mode 100644 index 0000000000..4dc2da85fc --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDatabasePrivateEndpointCompartmentConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabasePrivateEndpointCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeDistributedDatabasePrivateEndpointCompartmentConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabasePrivateEndpointCompartmentRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabasePrivateEndpointCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDatabasePrivateEndpointCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeDistributedDatabasePrivateEndpointCompartmentDetails(), + "changeDistributedDatabasePrivateEndpointCompartmentDetails is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ChangeDistributedDatabasePrivateEndpointCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDatabasePrivateEndpointCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDbBackupConfigConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDbBackupConfigConverter.java new file mode 100644 index 0000000000..51c36f83c2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ChangeDistributedDbBackupConfigConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDbBackupConfigConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeDistributedDbBackupConfigConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDbBackupConfigRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ChangeDistributedDbBackupConfigRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ChangeDistributedDbBackupConfigRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getChangeDistributedDbBackupConfigDetails(), + "changeDistributedDbBackupConfigDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("changeDbBackupConfig"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ChangeDistributedDbBackupConfigResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ChangeDistributedDbBackupConfigResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.java new file mode 100644 index 0000000000..2a682b7933 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails(), + "configureDistributedAutonomousDatabaseAutoResourceManagementDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("configureAutoResourceManagement"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabaseAutoResourceManagementDetails( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmWalletConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmWalletConverter.java new file mode 100644 index 0000000000..7a2a6e38a2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmWalletConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmWalletConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureDistributedAutonomousDatabaseGsmWalletConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmWalletRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmWalletRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmWalletRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getConfigureDistributedAutonomousDatabaseGsmWalletDetails(), + "configureDistributedAutonomousDatabaseGsmWalletDetails is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("configureGsmWallet"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedAutonomousDatabaseGsmWalletResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmWalletResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmsConverter.java new file mode 100644 index 0000000000..80b489d4f7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseGsmsConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureDistributedAutonomousDatabaseGsmsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseGsmsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getConfigureDistributedAutonomousDatabaseGsmsDetails(), + "configureDistributedAutonomousDatabaseGsmsDetails is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("configureGsms"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedAutonomousDatabaseGsmsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseGsmsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseShardingConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseShardingConverter.java new file mode 100644 index 0000000000..da80c23e01 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedAutonomousDatabaseShardingConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseShardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureDistributedAutonomousDatabaseShardingConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseShardingRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseShardingRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedAutonomousDatabaseShardingRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("configureSharding"); + + if (request.getIsRebalanceRequired() != null) { + target = + target.queryParam( + "isRebalanceRequired", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsRebalanceRequired())); + } + + if (request.getCertificateId() != null) { + target = + target.queryParam( + "certificateId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCertificateId())); + } + + if (request.getCaBundleId() != null) { + target = + target.queryParam( + "caBundleId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCaBundleId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedAutonomousDatabaseShardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedAutonomousDatabaseShardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseAutoResourceManagementConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseAutoResourceManagementConverter.java new file mode 100644 index 0000000000..67ee148489 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseAutoResourceManagementConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseAutoResourceManagementConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureDistributedDatabaseAutoResourceManagementConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseAutoResourceManagementRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseAutoResourceManagementRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseAutoResourceManagementRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getConfigureDistributedDatabaseAutoResourceManagementDetails(), + "configureDistributedDatabaseAutoResourceManagementDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("configureAutoResourceManagement"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedDatabaseAutoResourceManagementResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabaseAutoResourceManagementDetails( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseAutoResourceManagementResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseGsmsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseGsmsConverter.java new file mode 100644 index 0000000000..940b186c1c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseGsmsConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseGsmsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfigureDistributedDatabaseGsmsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseGsmsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseGsmsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ConfigureDistributedDatabaseGsmsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getConfigureDistributedDatabaseGsmsDetails(), + "configureDistributedDatabaseGsmsDetails is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("configureGsms"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedDatabaseGsmsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseGsmsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseShardingConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseShardingConverter.java new file mode 100644 index 0000000000..d11b14b4b6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ConfigureDistributedDatabaseShardingConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseShardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfigureDistributedDatabaseShardingConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseShardingRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseShardingRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ConfigureDistributedDatabaseShardingRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("configureSharding"); + + if (request.getIsRebalanceRequired() != null) { + target = + target.queryParam( + "isRebalanceRequired", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsRebalanceRequired())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ConfigureDistributedDatabaseShardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ConfigureDistributedDatabaseShardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..5a0636f2de --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDistributedAutonomousDatabaseDetails(), + "createDistributedAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260101").path("distributedAutonomousDatabases"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.CreateDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabase(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabaseConverter.java new file mode 100644 index 0000000000..dcfa8c987d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabaseConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.CreateDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.CreateDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.CreateDistributedDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDistributedDatabaseDetails(), + "createDistributedDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260101").path("distributedDatabases"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.CreateDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabase(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabasePrivateEndpointConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabasePrivateEndpointConverter.java new file mode 100644 index 0000000000..8d156956c9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/CreateDistributedDatabasePrivateEndpointConverter.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabasePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + CreateDistributedDatabasePrivateEndpointConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedDatabasePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedDatabasePrivateEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .CreateDistributedDatabasePrivateEndpointRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDistributedDatabasePrivateEndpointDetails(), + "createDistributedDatabasePrivateEndpointDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.CreateDistributedDatabasePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabasePrivateEndpoint(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .CreateDistributedDatabasePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..6289c0492f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.DeleteDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabaseConverter.java new file mode 100644 index 0000000000..afd19181a0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabaseConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.DeleteDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.DeleteDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.DeleteDistributedDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.DeleteDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabasePrivateEndpointConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabasePrivateEndpointConverter.java new file mode 100644 index 0000000000..59eddc9ed1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/DeleteDistributedDatabasePrivateEndpointConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabasePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + DeleteDistributedDatabasePrivateEndpointConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedDatabasePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedDatabasePrivateEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .DeleteDistributedDatabasePrivateEndpointRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.DeleteDistributedDatabasePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .DeleteDistributedDatabasePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedAutonomousDatabaseWalletConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedAutonomousDatabaseWalletConverter.java new file mode 100644 index 0000000000..5ed6b8cbc6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedAutonomousDatabaseWalletConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedAutonomousDatabaseWalletConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + GenerateDistributedAutonomousDatabaseWalletConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GenerateDistributedAutonomousDatabaseWalletRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GenerateDistributedAutonomousDatabaseWalletRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .GenerateDistributedAutonomousDatabaseWalletRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getGenerateDistributedAutonomousDatabaseWalletDetails(), + "generateDistributedAutonomousDatabaseWalletDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("generateWallet"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("application/octet-stream"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GenerateDistributedAutonomousDatabaseWalletResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> contentLengthHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-length"); + if (contentLengthHeader.isPresent()) { + builder.contentLength( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-length", + contentLengthHeader.get().get(0), + Long.class)); + } + + java.util.Optional> lastModifiedHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "last-modified"); + if (lastModifiedHeader.isPresent()) { + builder.lastModified( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "last-modified", + lastModifiedHeader.get().get(0), + java.util.Date.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedAutonomousDatabaseWalletResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedDatabaseWalletConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedDatabaseWalletConverter.java new file mode 100644 index 0000000000..232bbbdb05 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GenerateDistributedDatabaseWalletConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedDatabaseWalletConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerateDistributedDatabaseWalletConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GenerateDistributedDatabaseWalletRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GenerateDistributedDatabaseWalletRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GenerateDistributedDatabaseWalletRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getGenerateDistributedDatabaseWalletDetails(), + "generateDistributedDatabaseWalletDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("generateWallet"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("application/octet-stream"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GenerateDistributedDatabaseWalletResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> contentLengthHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-length"); + if (contentLengthHeader.isPresent()) { + builder.contentLength( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-length", + contentLengthHeader.get().get(0), + Long.class)); + } + + java.util.Optional> lastModifiedHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "last-modified"); + if (lastModifiedHeader.isPresent()) { + builder.lastModified( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "last-modified", + lastModifiedHeader.get().get(0), + java.util.Date.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GenerateDistributedDatabaseWalletResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..4c877bd20a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GetDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())); + + if (request.getMetadata() != null) { + target = + target.queryParam( + "metadata", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMetadata())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfNoneMatch() != null) { + ib.header("if-none-match", request.getIfNoneMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabase(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRaftMetricConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRaftMetricConverter.java new file mode 100644 index 0000000000..bece535452 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRaftMetricConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRaftMetricConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + GetDistributedAutonomousDatabaseRaftMetricConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRaftMetricRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRaftMetricRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRaftMetricRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("raftMetrics"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedAutonomousDatabaseRaftMetricResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRaftMetric>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRaftMetric + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRaftMetric + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRaftMetric> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabaseRaftMetric(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRaftMetricResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRuChangeLogConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRuChangeLogConverter.java new file mode 100644 index 0000000000..b12630c4d3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedAutonomousDatabaseRuChangeLogConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRuChangeLogConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + GetDistributedAutonomousDatabaseRuChangeLogConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRuChangeLogRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRuChangeLogRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedAutonomousDatabaseRuChangeLogRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("ruChangeLog"); + + if (request.getSourceShardName() != null) { + target = + target.queryParam( + "sourceShardName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSourceShardName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedAutonomousDatabaseRuChangeLogResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRuChangeLog>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRuChangeLog + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRuChangeLog + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseRuChangeLog> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabaseRuChangeLog( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedAutonomousDatabaseRuChangeLogResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseConverter.java new file mode 100644 index 0000000000..fc940cbe43 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.GetDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.GetDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GetDistributedDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())); + + if (request.getMetadata() != null) { + target = + target.queryParam( + "metadata", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMetadata())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfNoneMatch() != null) { + ib.header("if-none-match", request.getIfNoneMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabase(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabasePrivateEndpointConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabasePrivateEndpointConverter.java new file mode 100644 index 0000000000..2ae1694b4d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabasePrivateEndpointConverter.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabasePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDistributedDatabasePrivateEndpointConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabasePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabasePrivateEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabasePrivateEndpointRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfNoneMatch() != null) { + ib.header("if-none-match", request.getIfNoneMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabasePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabasePrivateEndpoint(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabasePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRaftMetricConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRaftMetricConverter.java new file mode 100644 index 0000000000..a8ad99dcd3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRaftMetricConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRaftMetricConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDistributedDatabaseRaftMetricConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabaseRaftMetricRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabaseRaftMetricRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GetDistributedDatabaseRaftMetricRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("raftMetrics"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabaseRaftMetricResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRaftMetric>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRaftMetric + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRaftMetric + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRaftMetric> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabaseRaftMetric(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRaftMetricResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRuChangeLogConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRuChangeLogConverter.java new file mode 100644 index 0000000000..259eb6f658 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetDistributedDatabaseRuChangeLogConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRuChangeLogConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDistributedDatabaseRuChangeLogConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabaseRuChangeLogRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .GetDistributedDatabaseRuChangeLogRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GetDistributedDatabaseRuChangeLogRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("ruChangeLog"); + + if (request.getSourceShardName() != null) { + target = + target.queryParam( + "sourceShardName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSourceShardName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetDistributedDatabaseRuChangeLogResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRuChangeLog>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRuChangeLog + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRuChangeLog + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseRuChangeLog> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabaseRuChangeLog(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetDistributedDatabaseRuChangeLogResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetWorkRequestConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetWorkRequestConverter.java new file mode 100644 index 0000000000..726613405e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.GetWorkRequestRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .GetWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .GetWorkRequestResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .GetWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedAutonomousDatabasesConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedAutonomousDatabasesConverter.java new file mode 100644 index 0000000000..d00bb24e09 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedAutonomousDatabasesConverter.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedAutonomousDatabasesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDistributedAutonomousDatabasesConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ListDistributedAutonomousDatabasesRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ListDistributedAutonomousDatabasesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ListDistributedAutonomousDatabasesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260101").path("distributedAutonomousDatabases"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getPrivateEndpointId() != null) { + target = + target.queryParam( + "privateEndpointId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPrivateEndpointId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getIsAutoResourceManagementEnabled() != null) { + target = + target.queryParam( + "isAutoResourceManagementEnabled", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsAutoResourceManagementEnabled())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getDbDeploymentType() != null) { + target = + target.queryParam( + "dbDeploymentType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDbDeploymentType())); + } + + if (request.getMetadata() != null) { + target = + target.queryParam( + "metadata", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMetadata())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListDistributedAutonomousDatabasesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabaseCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedAutonomousDatabasesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasePrivateEndpointsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasePrivateEndpointsConverter.java new file mode 100644 index 0000000000..fc2a9ecb4a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasePrivateEndpointsConverter.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasePrivateEndpointsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListDistributedDatabasePrivateEndpointsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ListDistributedDatabasePrivateEndpointsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ListDistributedDatabasePrivateEndpointsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ListDistributedDatabasePrivateEndpointsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListDistributedDatabasePrivateEndpointsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabasePrivateEndpointCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasePrivateEndpointsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasesConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasesConverter.java new file mode 100644 index 0000000000..13580dca07 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListDistributedDatabasesConverter.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDistributedDatabasesConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ListDistributedDatabasesRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.ListDistributedDatabasesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ListDistributedDatabasesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260101").path("distributedDatabases"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getPrivateEndpointId() != null) { + target = + target.queryParam( + "privateEndpointId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPrivateEndpointId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getIsAutoResourceManagementEnabled() != null) { + target = + target.queryParam( + "isAutoResourceManagementEnabled", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsAutoResourceManagementEnabled())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getDbDeploymentType() != null) { + target = + target.queryParam( + "dbDeploymentType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDbDeploymentType())); + } + + if (request.getMetadata() != null) { + target = + target.queryParam( + "metadata", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMetadata())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListDistributedDatabasesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabaseCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListDistributedDatabasesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestErrorsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 0000000000..aa1e2e337e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestLogsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 0000000000..63152502fd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestLogsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestLogsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestLogsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 0000000000..94d7249670 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260101").path("workRequests"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedAutonomousDatabaseReplicationUnitConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedAutonomousDatabaseReplicationUnitConverter.java new file mode 100644 index 0000000000..5dbbf2e6aa --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedAutonomousDatabaseReplicationUnitConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedAutonomousDatabaseReplicationUnitConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + MoveDistributedAutonomousDatabaseReplicationUnitConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedAutonomousDatabaseReplicationUnitRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedAutonomousDatabaseReplicationUnitRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedAutonomousDatabaseReplicationUnitRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getMoveDistributedAutonomousDatabaseReplicationUnitDetails(), + "moveDistributedAutonomousDatabaseReplicationUnitDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("moveReplicationUnit"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.MoveDistributedAutonomousDatabaseReplicationUnitResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedAutonomousDatabaseReplicationUnitResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedDatabaseReplicationUnitConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedDatabaseReplicationUnitConverter.java new file mode 100644 index 0000000000..7883724abe --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/MoveDistributedDatabaseReplicationUnitConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedDatabaseReplicationUnitConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + MoveDistributedDatabaseReplicationUnitConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedDatabaseReplicationUnitRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedDatabaseReplicationUnitRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .MoveDistributedDatabaseReplicationUnitRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getMoveDistributedDatabaseReplicationUnitDetails(), + "moveDistributedDatabaseReplicationUnitDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("moveReplicationUnit"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.MoveDistributedDatabaseReplicationUnitResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .MoveDistributedDatabaseReplicationUnitResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..7212376871 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .PatchDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .PatchDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.PatchDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getPatchDistributedAutonomousDatabaseDetails(), + "patchDistributedAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.PatchDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabaseConverter.java new file mode 100644 index 0000000000..765d198e48 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabaseConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.PatchDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.PatchDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.PatchDistributedDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getPatchDistributedDatabaseDetails(), + "patchDistributedDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.PatchDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabasePrivateEndpointConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabasePrivateEndpointConverter.java new file mode 100644 index 0000000000..46e0ac589c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/PatchDistributedDatabasePrivateEndpointConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabasePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + PatchDistributedDatabasePrivateEndpointConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .PatchDistributedDatabasePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .PatchDistributedDatabasePrivateEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .PatchDistributedDatabasePrivateEndpointRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + Validate.notNull( + request.getPatchDistributedDatabasePrivateEndpointDetails(), + "patchDistributedDatabasePrivateEndpointDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.PatchDistributedDatabasePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .PatchDistributedDatabasePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedAutonomousDatabaseResourceConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedAutonomousDatabaseResourceConverter.java new file mode 100644 index 0000000000..5cefd73295 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedAutonomousDatabaseResourceConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedAutonomousDatabaseResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + RecreateFailedDistributedAutonomousDatabaseResourceConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedAutonomousDatabaseResourceRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedAutonomousDatabaseResourceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedAutonomousDatabaseResourceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull(request.getResourceName(), "resourceName is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("recreateFailedResource"); + + target = + target.queryParam( + "resourceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.RecreateFailedDistributedAutonomousDatabaseResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedAutonomousDatabaseResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedDatabaseResourceConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedDatabaseResourceConverter.java new file mode 100644 index 0000000000..cede2d35ff --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RecreateFailedDistributedDatabaseResourceConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedDatabaseResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + RecreateFailedDistributedDatabaseResourceConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedDatabaseResourceRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedDatabaseResourceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .RecreateFailedDistributedDatabaseResourceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull(request.getResourceName(), "resourceName is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("recreateFailedResource"); + + target = + target.queryParam( + "resourceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.RecreateFailedDistributedDatabaseResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .RecreateFailedDistributedDatabaseResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ReinstateProxyInstanceConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ReinstateProxyInstanceConverter.java new file mode 100644 index 0000000000..04ea03f558 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ReinstateProxyInstanceConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ReinstateProxyInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReinstateProxyInstanceConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ReinstateProxyInstanceRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.ReinstateProxyInstanceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ReinstateProxyInstanceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())) + .path("actions") + .path("reinstateProxyInstance"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ReinstateProxyInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.ReinstateProxyInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ReinstateProxyInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ReinstateProxyInstanceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedAutonomousDatabasePasswordsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedAutonomousDatabasePasswordsConverter.java new file mode 100644 index 0000000000..14027af0d5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedAutonomousDatabasePasswordsConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedAutonomousDatabasePasswordsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + RotateDistributedAutonomousDatabasePasswordsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .RotateDistributedAutonomousDatabasePasswordsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .RotateDistributedAutonomousDatabasePasswordsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .RotateDistributedAutonomousDatabasePasswordsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getRotateDistributedAutonomousDatabasePasswordsDetails(), + "rotateDistributedAutonomousDatabasePasswordsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("rotateDbPasswords"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.RotateDistributedAutonomousDatabasePasswordsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedAutonomousDatabasePasswordsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedDatabasePasswordsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedDatabasePasswordsConverter.java new file mode 100644 index 0000000000..eb5623127e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/RotateDistributedDatabasePasswordsConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedDatabasePasswordsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RotateDistributedDatabasePasswordsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .RotateDistributedDatabasePasswordsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .RotateDistributedDatabasePasswordsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.RotateDistributedDatabasePasswordsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getRotateDistributedDatabasePasswordsDetails(), + "rotateDistributedDatabasePasswordsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("rotateDbPasswords"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.RotateDistributedDatabasePasswordsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .RotateDistributedDatabasePasswordsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedAutonomousDatabaseGsmsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedAutonomousDatabaseGsmsConverter.java new file mode 100644 index 0000000000..b779f5d31d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedAutonomousDatabaseGsmsConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedAutonomousDatabaseGsmsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ScaleDistributedAutonomousDatabaseGsmsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ScaleDistributedAutonomousDatabaseGsmsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ScaleDistributedAutonomousDatabaseGsmsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ScaleDistributedAutonomousDatabaseGsmsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getScaleDistributedAutonomousDatabaseGsmsDetails(), + "scaleDistributedAutonomousDatabaseGsmsDetails is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("scaleGsms"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ScaleDistributedAutonomousDatabaseGsmsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedAutonomousDatabaseGsmsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedDatabaseGsmsConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedDatabaseGsmsConverter.java new file mode 100644 index 0000000000..cfb6e50733 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ScaleDistributedDatabaseGsmsConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedDatabaseGsmsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ScaleDistributedDatabaseGsmsConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.ScaleDistributedDatabaseGsmsRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ScaleDistributedDatabaseGsmsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ScaleDistributedDatabaseGsmsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getScaleDistributedDatabaseGsmsDetails(), + "scaleDistributedDatabaseGsmsDetails is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("scaleGsms"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ScaleDistributedDatabaseGsmsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ScaleDistributedDatabaseGsmsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..c48eedbcee --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StartDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .StartDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .StartDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.StartDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("startDatabase"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.StartDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedDatabaseConverter.java new file mode 100644 index 0000000000..66c7f29e4c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StartDistributedDatabaseConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StartDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.StartDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.StartDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.StartDistributedDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("startDatabase"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.StartDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .StartDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..435bb8ea6c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StopDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .StopDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .StopDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.StopDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("stopDatabase"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.StopDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedDatabaseConverter.java new file mode 100644 index 0000000000..e2160779d6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/StopDistributedDatabaseConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StopDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.StopDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.StopDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.StopDistributedDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("stopDatabase"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.StopDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses.StopDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.StopDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .StopDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedAutonomousDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedAutonomousDatabaseConverter.java new file mode 100644 index 0000000000..2f4467718b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedAutonomousDatabaseConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateDistributedAutonomousDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedAutonomousDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedAutonomousDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedAutonomousDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + Validate.notNull( + request.getUpdateDistributedAutonomousDatabaseDetails(), + "updateDistributedAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.UpdateDistributedAutonomousDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedAutonomousDatabase(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedAutonomousDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabaseConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabaseConverter.java new file mode 100644 index 0000000000..b11e60a336 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabaseConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateDistributedDatabaseConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests.UpdateDistributedDatabaseRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests.UpdateDistributedDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.UpdateDistributedDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + Validate.notNull( + request.getUpdateDistributedDatabaseDetails(), + "updateDistributedDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.UpdateDistributedDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabase(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabasePrivateEndpointConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabasePrivateEndpointConverter.java new file mode 100644 index 0000000000..01c04816f8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/UpdateDistributedDatabasePrivateEndpointConverter.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabasePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + UpdateDistributedDatabasePrivateEndpointConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedDatabasePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedDatabasePrivateEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .UpdateDistributedDatabasePrivateEndpointRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabasePrivateEndpointId(), + "distributedDatabasePrivateEndpointId must not be blank"); + Validate.notNull( + request.getUpdateDistributedDatabasePrivateEndpointDetails(), + "updateDistributedDatabasePrivateEndpointDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabasePrivateEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabasePrivateEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.UpdateDistributedDatabasePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.distributedDatabasePrivateEndpoint(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .UpdateDistributedDatabasePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseCaBundleConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseCaBundleConverter.java new file mode 100644 index 0000000000..5c60b08e56 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseCaBundleConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseCaBundleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ValidateDistributedAutonomousDatabaseCaBundleConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseCaBundleRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseCaBundleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseCaBundleRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("validateCaBundle"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ValidateDistributedAutonomousDatabaseCaBundleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseCaBundleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseNetworkConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseNetworkConverter.java new file mode 100644 index 0000000000..1e43eca8b7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedAutonomousDatabaseNetworkConverter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseNetworkConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ValidateDistributedAutonomousDatabaseNetworkConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseNetworkRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseNetworkRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedAutonomousDatabaseNetworkRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedAutonomousDatabaseId(), + "distributedAutonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedAutonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedAutonomousDatabaseId())) + .path("actions") + .path("validateNetwork"); + + if (request.getIsSurrogate() != null) { + target = + target.queryParam( + "isSurrogate", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsSurrogate())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ValidateDistributedAutonomousDatabaseNetworkResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse + .Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedAutonomousDatabaseNetworkResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedDatabaseNetworkConverter.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedDatabaseNetworkConverter.java new file mode 100644 index 0000000000..ab51065f97 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/internal/http/ValidateDistributedDatabaseNetworkConverter.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.distributeddatabasev26.model.*; +import com.oracle.bmc.distributeddatabasev26.requests.*; +import com.oracle.bmc.distributeddatabasev26.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedDatabaseNetworkConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ValidateDistributedDatabaseNetworkConverter.class); + + public static com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedDatabaseNetworkRequest + interceptRequest( + com.oracle.bmc.distributeddatabasev26.requests + .ValidateDistributedDatabaseNetworkRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.distributeddatabasev26.requests.ValidateDistributedDatabaseNetworkRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDistributedDatabaseId(), "distributedDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260101") + .path("distributedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDistributedDatabaseId())) + .path("actions") + .path("validateNetwork"); + + if (request.getIsSurrogate() != null) { + target = + target.queryParam( + "isSurrogate", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsSurrogate())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse>() { + @Override + public com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.distributeddatabasev26.responses.ValidateDistributedDatabaseNetworkResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse.Builder + builder = + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.distributeddatabasev26.responses + .ValidateDistributedDatabaseNetworkResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ActionType.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ActionType.java new file mode 100644 index 0000000000..87a759e84b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum ActionType { + 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedAutonomousDatabaseGdsControlNodeDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedAutonomousDatabaseGdsControlNodeDetails.java new file mode 100644 index 0000000000..bd6e3e4eaa --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedAutonomousDatabaseGdsControlNodeDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a new Global database services control(GDS CTL) compute node. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddDistributedAutonomousDatabaseGdsControlNodeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddDistributedAutonomousDatabaseGdsControlNodeDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"publicSshKey", "subnetId"}) + public AddDistributedAutonomousDatabaseGdsControlNodeDetails( + String publicSshKey, String subnetId) { + super(); + this.publicSshKey = publicSshKey; + this.subnetId = subnetId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The public sshKey for Global database services control(GDS CTL) node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicSshKey") + private String publicSshKey; + + /** + * The public sshKey for Global database services control(GDS CTL) node. + * @param publicSshKey the value to set + * @return this builder + **/ + public Builder publicSshKey(String publicSshKey) { + this.publicSshKey = publicSshKey; + this.__explicitlySet__.add("publicSshKey"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddDistributedAutonomousDatabaseGdsControlNodeDetails build() { + AddDistributedAutonomousDatabaseGdsControlNodeDetails model = + new AddDistributedAutonomousDatabaseGdsControlNodeDetails( + this.publicSshKey, this.subnetId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddDistributedAutonomousDatabaseGdsControlNodeDetails model) { + if (model.wasPropertyExplicitlySet("publicSshKey")) { + this.publicSshKey(model.getPublicSshKey()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The public sshKey for Global database services control(GDS CTL) node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicSshKey") + private final String publicSshKey; + + /** + * The public sshKey for Global database services control(GDS CTL) node. + * @return the value + **/ + public String getPublicSshKey() { + return publicSshKey; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + @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("AddDistributedAutonomousDatabaseGdsControlNodeDetails("); + sb.append("super=").append(super.toString()); + sb.append("publicSshKey=").append(String.valueOf(this.publicSshKey)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddDistributedAutonomousDatabaseGdsControlNodeDetails)) { + return false; + } + + AddDistributedAutonomousDatabaseGdsControlNodeDetails other = + (AddDistributedAutonomousDatabaseGdsControlNodeDetails) o; + return java.util.Objects.equals(this.publicSshKey, other.publicSshKey) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.publicSshKey == null ? 43 : this.publicSshKey.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedDatabaseGdsControlNodeDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedDatabaseGdsControlNodeDetails.java new file mode 100644 index 0000000000..c0aa7bb7c5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AddDistributedDatabaseGdsControlNodeDetails.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a new Global database services control(GDS CTL) compute node. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddDistributedDatabaseGdsControlNodeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddDistributedDatabaseGdsControlNodeDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"publicSshKey", "subnetId"}) + public AddDistributedDatabaseGdsControlNodeDetails(String publicSshKey, String subnetId) { + super(); + this.publicSshKey = publicSshKey; + this.subnetId = subnetId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The public sshKey for Global database services control(GDS CTL) node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicSshKey") + private String publicSshKey; + + /** + * The public sshKey for Global database services control(GDS CTL) node. + * @param publicSshKey the value to set + * @return this builder + **/ + public Builder publicSshKey(String publicSshKey) { + this.publicSshKey = publicSshKey; + this.__explicitlySet__.add("publicSshKey"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddDistributedDatabaseGdsControlNodeDetails build() { + AddDistributedDatabaseGdsControlNodeDetails model = + new AddDistributedDatabaseGdsControlNodeDetails( + this.publicSshKey, this.subnetId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddDistributedDatabaseGdsControlNodeDetails model) { + if (model.wasPropertyExplicitlySet("publicSshKey")) { + this.publicSshKey(model.getPublicSshKey()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The public sshKey for Global database services control(GDS CTL) node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicSshKey") + private final String publicSshKey; + + /** + * The public sshKey for Global database services control(GDS CTL) node. + * @return the value + **/ + public String getPublicSshKey() { + return publicSshKey; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet on which the Global database services control(GDS CTL) node should be created. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + @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("AddDistributedDatabaseGdsControlNodeDetails("); + sb.append("super=").append(super.toString()); + sb.append("publicSshKey=").append(String.valueOf(this.publicSshKey)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddDistributedDatabaseGdsControlNodeDetails)) { + return false; + } + + AddDistributedDatabaseGdsControlNodeDetails other = + (AddDistributedDatabaseGdsControlNodeDetails) o; + return java.util.Objects.equals(this.publicSshKey, other.publicSshKey) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.publicSshKey == null ? 43 : this.publicSshKey.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutoResourceManagementConfigurationDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutoResourceManagementConfigurationDetails.java new file mode 100644 index 0000000000..7491bd7e0e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutoResourceManagementConfigurationDetails.java @@ -0,0 +1,577 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Automatic resource management configuration details for the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutoResourceManagementConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutoResourceManagementConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEnabled", + "coolOffPeriodInMinutes", + "maxMoveRuAttempts", + "maxMoveRuUnit", + "mode", + "actionType", + "notificationTopicIds", + "streamIds" + }) + public AutoResourceManagementConfigurationDetails( + Boolean isEnabled, + Integer coolOffPeriodInMinutes, + Integer maxMoveRuAttempts, + MaxMoveRuUnit maxMoveRuUnit, + Mode mode, + ActionType actionType, + java.util.List notificationTopicIds, + java.util.List streamIds) { + super(); + this.isEnabled = isEnabled; + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.maxMoveRuUnit = maxMoveRuUnit; + this.mode = mode; + this.actionType = actionType; + this.notificationTopicIds = notificationTopicIds; + this.streamIds = streamIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @param coolOffPeriodInMinutes the value to set + * @return this builder + **/ + public Builder coolOffPeriodInMinutes(Integer coolOffPeriodInMinutes) { + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.__explicitlySet__.add("coolOffPeriodInMinutes"); + return this; + } + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @param maxMoveRuAttempts the value to set + * @return this builder + **/ + public Builder maxMoveRuAttempts(Integer maxMoveRuAttempts) { + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.__explicitlySet__.add("maxMoveRuAttempts"); + return this; + } + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @param maxMoveRuUnit the value to set + * @return this builder + **/ + public Builder maxMoveRuUnit(MaxMoveRuUnit maxMoveRuUnit) { + this.maxMoveRuUnit = maxMoveRuUnit; + this.__explicitlySet__.add("maxMoveRuUnit"); + return this; + } + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @param mode the value to set + * @return this builder + **/ + public Builder mode(Mode mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @param streamIds the value to set + * @return this builder + **/ + public Builder streamIds(java.util.List streamIds) { + this.streamIds = streamIds; + this.__explicitlySet__.add("streamIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutoResourceManagementConfigurationDetails build() { + AutoResourceManagementConfigurationDetails model = + new AutoResourceManagementConfigurationDetails( + this.isEnabled, + this.coolOffPeriodInMinutes, + this.maxMoveRuAttempts, + this.maxMoveRuUnit, + this.mode, + this.actionType, + this.notificationTopicIds, + this.streamIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutoResourceManagementConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + if (model.wasPropertyExplicitlySet("coolOffPeriodInMinutes")) { + this.coolOffPeriodInMinutes(model.getCoolOffPeriodInMinutes()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuAttempts")) { + this.maxMoveRuAttempts(model.getMaxMoveRuAttempts()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuUnit")) { + this.maxMoveRuUnit(model.getMaxMoveRuUnit()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("streamIds")) { + this.streamIds(model.getStreamIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private final Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @return the value + **/ + public Integer getCoolOffPeriodInMinutes() { + return coolOffPeriodInMinutes; + } + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private final Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @return the value + **/ + public Integer getMaxMoveRuAttempts() { + return maxMoveRuAttempts; + } + + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + public enum MaxMoveRuUnit { + Hour("HOUR"), + Day("DAY"), + + /** + * 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(MaxMoveRuUnit.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaxMoveRuUnit v : MaxMoveRuUnit.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaxMoveRuUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaxMoveRuUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaxMoveRuUnit', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private final MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @return the value + **/ + public MaxMoveRuUnit getMaxMoveRuUnit() { + return maxMoveRuUnit; + } + + /** + * Mode of autoResourceManagement execution. + **/ + public enum Mode { + Automatic("AUTOMATIC"), + Recommendation("RECOMMENDATION"), + + /** + * 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(Mode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Mode v : Mode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Mode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Mode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Mode', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @return the value + **/ + public Mode getMode() { + return mode; + } + + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + public enum ActionType { + Move("MOVE"), + + /** + * 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 action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private final java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @return the value + **/ + public java.util.List getStreamIds() { + return streamIds; + } + + @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("AutoResourceManagementConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", coolOffPeriodInMinutes=").append(String.valueOf(this.coolOffPeriodInMinutes)); + sb.append(", maxMoveRuAttempts=").append(String.valueOf(this.maxMoveRuAttempts)); + sb.append(", maxMoveRuUnit=").append(String.valueOf(this.maxMoveRuUnit)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", streamIds=").append(String.valueOf(this.streamIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutoResourceManagementConfigurationDetails)) { + return false; + } + + AutoResourceManagementConfigurationDetails other = + (AutoResourceManagementConfigurationDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals( + this.coolOffPeriodInMinutes, other.coolOffPeriodInMinutes) + && java.util.Objects.equals(this.maxMoveRuAttempts, other.maxMoveRuAttempts) + && java.util.Objects.equals(this.maxMoveRuUnit, other.maxMoveRuUnit) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.streamIds, other.streamIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = + (result * PRIME) + + (this.coolOffPeriodInMinutes == null + ? 43 + : this.coolOffPeriodInMinutes.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuAttempts == null ? 43 : this.maxMoveRuAttempts.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuUnit == null ? 43 : this.maxMoveRuUnit.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.streamIds == null ? 43 : this.streamIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpace.java new file mode 100644 index 0000000000..134b04c657 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpace.java @@ -0,0 +1,265 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Composite data guard shard space details for a Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousCompositeDataGuardShardSpace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousCompositeDataGuardShardSpace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "originalReplica", + "dataGuardReplicas" + }) + public AutonomousCompositeDataGuardShardSpace( + String name, + Integer chunkCount, + AutonomousCompositeDataGuardShardSpaceReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private AutonomousCompositeDataGuardShardSpaceReplica originalReplica; + + public Builder originalReplica( + AutonomousCompositeDataGuardShardSpaceReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica associated with the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replica associated with the shard. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousCompositeDataGuardShardSpace build() { + AutonomousCompositeDataGuardShardSpace model = + new AutonomousCompositeDataGuardShardSpace( + this.name, + this.chunkCount, + this.originalReplica, + this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousCompositeDataGuardShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final AutonomousCompositeDataGuardShardSpaceReplica originalReplica; + + public AutonomousCompositeDataGuardShardSpaceReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica associated with the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replica associated with the shard. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("AutonomousCompositeDataGuardShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousCompositeDataGuardShardSpace)) { + return false; + } + + AutonomousCompositeDataGuardShardSpace other = (AutonomousCompositeDataGuardShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpaceReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpaceReplica.java new file mode 100644 index 0000000000..d106b37025 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeDataGuardShardSpaceReplica.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite data guard replica details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousCompositeDataGuardShardSpaceReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousCompositeDataGuardShardSpaceReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public AutonomousCompositeDataGuardShardSpaceReplica( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousCompositeDataGuardShardSpaceReplica build() { + AutonomousCompositeDataGuardShardSpaceReplica model = + new AutonomousCompositeDataGuardShardSpaceReplica(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousCompositeDataGuardShardSpaceReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("AutonomousCompositeDataGuardShardSpaceReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousCompositeDataGuardShardSpaceReplica)) { + return false; + } + + AutonomousCompositeDataGuardShardSpaceReplica other = + (AutonomousCompositeDataGuardShardSpaceReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeRaftShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeRaftShardSpace.java new file mode 100644 index 0000000000..79e989f242 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeRaftShardSpace.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Composite raft shard space details for a Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousCompositeRaftShardSpace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousCompositeRaftShardSpace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "replicationUnitCount", + "raftClusters" + }) + public AutonomousCompositeRaftShardSpace( + String name, + Integer chunkCount, + Integer replicationUnitCount, + java.util.List raftClusters) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.replicationUnitCount = replicationUnitCount; + this.raftClusters = raftClusters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @param replicationUnitCount the value to set + * @return this builder + **/ + public Builder replicationUnitCount(Integer replicationUnitCount) { + this.replicationUnitCount = replicationUnitCount; + this.__explicitlySet__.add("replicationUnitCount"); + return this; + } + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @param raftClusters the value to set + * @return this builder + **/ + public Builder raftClusters( + java.util.List raftClusters) { + this.raftClusters = raftClusters; + this.__explicitlySet__.add("raftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousCompositeRaftShardSpace build() { + AutonomousCompositeRaftShardSpace model = + new AutonomousCompositeRaftShardSpace( + this.name, + this.chunkCount, + this.replicationUnitCount, + this.raftClusters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousCompositeRaftShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("replicationUnitCount")) { + this.replicationUnitCount(model.getReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("raftClusters")) { + this.raftClusters(model.getRaftClusters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private final Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @return the value + **/ + public Integer getReplicationUnitCount() { + return replicationUnitCount; + } + + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private final java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @return the value + **/ + public java.util.List getRaftClusters() { + return raftClusters; + } + + @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("AutonomousCompositeRaftShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", replicationUnitCount=").append(String.valueOf(this.replicationUnitCount)); + sb.append(", raftClusters=").append(String.valueOf(this.raftClusters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousCompositeRaftShardSpace)) { + return false; + } + + AutonomousCompositeRaftShardSpace other = (AutonomousCompositeRaftShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.replicationUnitCount, other.replicationUnitCount) + && java.util.Objects.equals(this.raftClusters, other.raftClusters) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.replicationUnitCount == null + ? 43 + : this.replicationUnitCount.hashCode()); + result = (result * PRIME) + (this.raftClusters == null ? 43 : this.raftClusters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeShardSpaceRaftCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeShardSpaceRaftCluster.java new file mode 100644 index 0000000000..140c14c3c4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousCompositeShardSpaceRaftCluster.java @@ -0,0 +1,364 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Raft cluster details for composite shard spaces. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousCompositeShardSpaceRaftCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousCompositeShardSpaceRaftCluster + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public AutonomousCompositeShardSpaceRaftCluster( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousCompositeShardSpaceRaftCluster build() { + AutonomousCompositeShardSpaceRaftCluster model = + new AutonomousCompositeShardSpaceRaftCluster( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousCompositeShardSpaceRaftCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + + /** + * 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(RuMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RuMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("AutonomousCompositeShardSpaceRaftCluster("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousCompositeShardSpaceRaftCluster)) { + return false; + } + + AutonomousCompositeShardSpaceRaftCluster other = + (AutonomousCompositeShardSpaceRaftCluster) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardDatabase.java new file mode 100644 index 0000000000..1b59b35b25 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardDatabase.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * System data guard shard database details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousSystemDataGuardDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousSystemDataGuardDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public AutonomousSystemDataGuardDatabase( + AutonomousSystemDataGuardReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private AutonomousSystemDataGuardReplica originalReplica; + + public Builder originalReplica(AutonomousSystemDataGuardReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The system data guard replica details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The system data guard replica details. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousSystemDataGuardDatabase build() { + AutonomousSystemDataGuardDatabase model = + new AutonomousSystemDataGuardDatabase( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousSystemDataGuardDatabase model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final AutonomousSystemDataGuardReplica originalReplica; + + public AutonomousSystemDataGuardReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The system data guard replica details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The system data guard replica details. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("AutonomousSystemDataGuardDatabase("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousSystemDataGuardDatabase)) { + return false; + } + + AutonomousSystemDataGuardDatabase other = (AutonomousSystemDataGuardDatabase) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardReplica.java new file mode 100644 index 0000000000..bcbaff08db --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemDataGuardReplica.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * System data guard replica details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousSystemDataGuardReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousSystemDataGuardReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public AutonomousSystemDataGuardReplica( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousSystemDataGuardReplica build() { + AutonomousSystemDataGuardReplica model = + new AutonomousSystemDataGuardReplica(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousSystemDataGuardReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("AutonomousSystemDataGuardReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousSystemDataGuardReplica)) { + return false; + } + + AutonomousSystemDataGuardReplica other = (AutonomousSystemDataGuardReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemRaftCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemRaftCluster.java new file mode 100644 index 0000000000..d3ba243ba6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousSystemRaftCluster.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create system raft cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousSystemRaftCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousSystemRaftCluster + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public AutonomousSystemRaftCluster( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousSystemRaftCluster build() { + AutonomousSystemRaftCluster model = + new AutonomousSystemRaftCluster( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousSystemRaftCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + + /** + * 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(RuMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RuMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("AutonomousSystemRaftCluster("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousSystemRaftCluster)) { + return false; + } + + AutonomousSystemRaftCluster other = (AutonomousSystemRaftCluster) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpace.java new file mode 100644 index 0000000000..d6a6b5a717 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpace.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Distributed autonomous database user shard space details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousUserShardSpace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousUserShardSpace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "originalReplica", "dataGuardReplicas"}) + public AutonomousUserShardSpace( + String name, + AutonomousUserShardSpaceReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private AutonomousUserShardSpaceReplica originalReplica; + + public Builder originalReplica(AutonomousUserShardSpaceReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * Details of data guard replicas for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * Details of data guard replicas for the user shard space. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousUserShardSpace build() { + AutonomousUserShardSpace model = + new AutonomousUserShardSpace( + this.name, this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousUserShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final AutonomousUserShardSpaceReplica originalReplica; + + public AutonomousUserShardSpaceReplica getOriginalReplica() { + return originalReplica; + } + + /** + * Details of data guard replicas for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * Details of data guard replicas for the user shard space. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("AutonomousUserShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousUserShardSpace)) { + return false; + } + + AutonomousUserShardSpace other = (AutonomousUserShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpaceReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpaceReplica.java new file mode 100644 index 0000000000..b5f16f7a5b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/AutonomousUserShardSpaceReplica.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * User shard space replica details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousUserShardSpaceReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousUserShardSpaceReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public AutonomousUserShardSpaceReplica( + String name, DistributedAutonomousDatabaseShardDatabase database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private DistributedAutonomousDatabaseShardDatabase database; + + public Builder database(DistributedAutonomousDatabaseShardDatabase database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousUserShardSpaceReplica build() { + AutonomousUserShardSpaceReplica model = + new AutonomousUserShardSpaceReplica(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousUserShardSpaceReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final DistributedAutonomousDatabaseShardDatabase database; + + public DistributedAutonomousDatabaseShardDatabase getDatabase() { + return database; + } + + @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("AutonomousUserShardSpaceReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousUserShardSpaceReplica)) { + return false; + } + + AutonomousUserShardSpaceReplica other = (AutonomousUserShardSpaceReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDatabaseCompartmentDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDatabaseCompartmentDetails.java new file mode 100644 index 0000000000..ccab319a94 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDatabaseCompartmentDetails.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The configuration details for moving the resource for Globally distributed autonomous database to other 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDistributedAutonomousDatabaseCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDistributedAutonomousDatabaseCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeDistributedAutonomousDatabaseCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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 ChangeDistributedAutonomousDatabaseCompartmentDetails build() { + ChangeDistributedAutonomousDatabaseCompartmentDetails model = + new ChangeDistributedAutonomousDatabaseCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDistributedAutonomousDatabaseCompartmentDetails 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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("ChangeDistributedAutonomousDatabaseCompartmentDetails("); + 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 ChangeDistributedAutonomousDatabaseCompartmentDetails)) { + return false; + } + + ChangeDistributedAutonomousDatabaseCompartmentDetails other = + (ChangeDistributedAutonomousDatabaseCompartmentDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDbBackupConfigDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDbBackupConfigDetails.java new file mode 100644 index 0000000000..31b37a95b5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedAutonomousDbBackupConfigDetails.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the DbBackupConfig to be updated for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDistributedAutonomousDbBackupConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDistributedAutonomousDbBackupConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dbBackupConfig"}) + public ChangeDistributedAutonomousDbBackupConfigDetails( + DistributedAutonomousDbBackupConfig dbBackupConfig) { + super(); + this.dbBackupConfig = dbBackupConfig; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedAutonomousDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedAutonomousDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeDistributedAutonomousDbBackupConfigDetails build() { + ChangeDistributedAutonomousDbBackupConfigDetails model = + new ChangeDistributedAutonomousDbBackupConfigDetails(this.dbBackupConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDistributedAutonomousDbBackupConfigDetails model) { + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedAutonomousDbBackupConfig dbBackupConfig; + + public DistributedAutonomousDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + @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("ChangeDistributedAutonomousDbBackupConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDistributedAutonomousDbBackupConfigDetails)) { + return false; + } + + ChangeDistributedAutonomousDbBackupConfigDetails other = + (ChangeDistributedAutonomousDbBackupConfigDetails) o; + return java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabaseCompartmentDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabaseCompartmentDetails.java new file mode 100644 index 0000000000..a7c9e8b0e2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabaseCompartmentDetails.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The configuration details for moving the resource for Globally distributed database to other 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDistributedDatabaseCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDistributedDatabaseCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeDistributedDatabaseCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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 ChangeDistributedDatabaseCompartmentDetails build() { + ChangeDistributedDatabaseCompartmentDetails model = + new ChangeDistributedDatabaseCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDistributedDatabaseCompartmentDetails 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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("ChangeDistributedDatabaseCompartmentDetails("); + 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 ChangeDistributedDatabaseCompartmentDetails)) { + return false; + } + + ChangeDistributedDatabaseCompartmentDetails other = + (ChangeDistributedDatabaseCompartmentDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabasePrivateEndpointCompartmentDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabasePrivateEndpointCompartmentDetails.java new file mode 100644 index 0000000000..121635d79e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDatabasePrivateEndpointCompartmentDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The configuration details for moving the resource for private endpoint to other 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDistributedDatabasePrivateEndpointCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDistributedDatabasePrivateEndpointCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeDistributedDatabasePrivateEndpointCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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 ChangeDistributedDatabasePrivateEndpointCompartmentDetails build() { + ChangeDistributedDatabasePrivateEndpointCompartmentDetails model = + new ChangeDistributedDatabasePrivateEndpointCompartmentDetails( + this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDistributedDatabasePrivateEndpointCompartmentDetails 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + * + * @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("ChangeDistributedDatabasePrivateEndpointCompartmentDetails("); + 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 ChangeDistributedDatabasePrivateEndpointCompartmentDetails)) { + return false; + } + + ChangeDistributedDatabasePrivateEndpointCompartmentDetails other = + (ChangeDistributedDatabasePrivateEndpointCompartmentDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDbBackupConfigDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDbBackupConfigDetails.java new file mode 100644 index 0000000000..3c914c8201 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ChangeDistributedDbBackupConfigDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the DbBackupConfig to be updated for the Globally distreibuted database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDistributedDbBackupConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDistributedDbBackupConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dbBackupConfig"}) + public ChangeDistributedDbBackupConfigDetails(DistributedDbBackupConfig dbBackupConfig) { + super(); + this.dbBackupConfig = dbBackupConfig; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeDistributedDbBackupConfigDetails build() { + ChangeDistributedDbBackupConfigDetails model = + new ChangeDistributedDbBackupConfigDetails(this.dbBackupConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDistributedDbBackupConfigDetails model) { + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedDbBackupConfig dbBackupConfig; + + public DistributedDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + @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("ChangeDistributedDbBackupConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDistributedDbBackupConfigDetails)) { + return false; + } + + ChangeDistributedDbBackupConfigDetails other = (ChangeDistributedDbBackupConfigDetails) o; + return java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpace.java new file mode 100644 index 0000000000..861671f71f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpace.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite data guard shard space details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompositeDataGuardShardSpace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompositeDataGuardShardSpace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "originalReplica", + "dataGuardReplicas" + }) + public CompositeDataGuardShardSpace( + String name, + Integer chunkCount, + CompositeDataGuardShardSpaceReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CompositeDataGuardShardSpaceReplica originalReplica; + + public Builder originalReplica(CompositeDataGuardShardSpaceReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica associated with the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replica associated with the shard. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompositeDataGuardShardSpace build() { + CompositeDataGuardShardSpace model = + new CompositeDataGuardShardSpace( + this.name, + this.chunkCount, + this.originalReplica, + this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompositeDataGuardShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CompositeDataGuardShardSpaceReplica originalReplica; + + public CompositeDataGuardShardSpaceReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica associated with the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replica associated with the shard. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CompositeDataGuardShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompositeDataGuardShardSpace)) { + return false; + } + + CompositeDataGuardShardSpace other = (CompositeDataGuardShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpaceReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpaceReplica.java new file mode 100644 index 0000000000..294d11aae2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeDataGuardShardSpaceReplica.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite data guard replica details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompositeDataGuardShardSpaceReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompositeDataGuardShardSpaceReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public CompositeDataGuardShardSpaceReplica( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @param databases the value to set + * @return this builder + **/ + public Builder databases(java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompositeDataGuardShardSpaceReplica build() { + CompositeDataGuardShardSpaceReplica model = + new CompositeDataGuardShardSpaceReplica(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompositeDataGuardShardSpaceReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CompositeDataGuardShardSpaceReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompositeDataGuardShardSpaceReplica)) { + return false; + } + + CompositeDataGuardShardSpaceReplica other = (CompositeDataGuardShardSpaceReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeRaftShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeRaftShardSpace.java new file mode 100644 index 0000000000..354633fda5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeRaftShardSpace.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite raft shard space. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompositeRaftShardSpace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompositeRaftShardSpace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "replicationUnitCount", + "raftClusters" + }) + public CompositeRaftShardSpace( + String name, + Integer chunkCount, + Integer replicationUnitCount, + java.util.List raftClusters) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.replicationUnitCount = replicationUnitCount; + this.raftClusters = raftClusters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @param replicationUnitCount the value to set + * @return this builder + **/ + public Builder replicationUnitCount(Integer replicationUnitCount) { + this.replicationUnitCount = replicationUnitCount; + this.__explicitlySet__.add("replicationUnitCount"); + return this; + } + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @param raftClusters the value to set + * @return this builder + **/ + public Builder raftClusters(java.util.List raftClusters) { + this.raftClusters = raftClusters; + this.__explicitlySet__.add("raftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompositeRaftShardSpace build() { + CompositeRaftShardSpace model = + new CompositeRaftShardSpace( + this.name, + this.chunkCount, + this.replicationUnitCount, + this.raftClusters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompositeRaftShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("replicationUnitCount")) { + this.replicationUnitCount(model.getReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("raftClusters")) { + this.raftClusters(model.getRaftClusters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private final Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @return the value + **/ + public Integer getReplicationUnitCount() { + return replicationUnitCount; + } + + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private final java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @return the value + **/ + public java.util.List getRaftClusters() { + return raftClusters; + } + + @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("CompositeRaftShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", replicationUnitCount=").append(String.valueOf(this.replicationUnitCount)); + sb.append(", raftClusters=").append(String.valueOf(this.raftClusters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompositeRaftShardSpace)) { + return false; + } + + CompositeRaftShardSpace other = (CompositeRaftShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.replicationUnitCount, other.replicationUnitCount) + && java.util.Objects.equals(this.raftClusters, other.raftClusters) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.replicationUnitCount == null + ? 43 + : this.replicationUnitCount.hashCode()); + result = (result * PRIME) + (this.raftClusters == null ? 43 : this.raftClusters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeShardSpaceRaftCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeShardSpaceRaftCluster.java new file mode 100644 index 0000000000..39acdc9efa --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CompositeShardSpaceRaftCluster.java @@ -0,0 +1,362 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Raft clusters details for composite shard spaces. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompositeShardSpaceRaftCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompositeShardSpaceRaftCluster + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public CompositeShardSpaceRaftCluster( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases(java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompositeShardSpaceRaftCluster build() { + CompositeShardSpaceRaftCluster model = + new CompositeShardSpaceRaftCluster( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompositeShardSpaceRaftCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + + /** + * 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(RuMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RuMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CompositeShardSpaceRaftCluster("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompositeShardSpaceRaftCluster)) { + return false; + } + + CompositeShardSpaceRaftCluster other = (CompositeShardSpaceRaftCluster) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails.java new file mode 100644 index 0000000000..4a4add55ea --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails.java @@ -0,0 +1,541 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Automatic resource management configuration details for the Globally distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEnabled", + "coolOffPeriodInMinutes", + "maxMoveRuAttempts", + "maxMoveRuUnit", + "mode", + "actionType", + "notificationTopicIds", + "streamIds" + }) + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails( + Boolean isEnabled, + Integer coolOffPeriodInMinutes, + Integer maxMoveRuAttempts, + MaxMoveRuUnit maxMoveRuUnit, + Mode mode, + ActionType actionType, + java.util.List notificationTopicIds, + java.util.List streamIds) { + super(); + this.isEnabled = isEnabled; + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.maxMoveRuUnit = maxMoveRuUnit; + this.mode = mode; + this.actionType = actionType; + this.notificationTopicIds = notificationTopicIds; + this.streamIds = streamIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @param coolOffPeriodInMinutes the value to set + * @return this builder + **/ + public Builder coolOffPeriodInMinutes(Integer coolOffPeriodInMinutes) { + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.__explicitlySet__.add("coolOffPeriodInMinutes"); + return this; + } + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @param maxMoveRuAttempts the value to set + * @return this builder + **/ + public Builder maxMoveRuAttempts(Integer maxMoveRuAttempts) { + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.__explicitlySet__.add("maxMoveRuAttempts"); + return this; + } + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @param maxMoveRuUnit the value to set + * @return this builder + **/ + public Builder maxMoveRuUnit(MaxMoveRuUnit maxMoveRuUnit) { + this.maxMoveRuUnit = maxMoveRuUnit; + this.__explicitlySet__.add("maxMoveRuUnit"); + return this; + } + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @param mode the value to set + * @return this builder + **/ + public Builder mode(Mode mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @param streamIds the value to set + * @return this builder + **/ + public Builder streamIds(java.util.List streamIds) { + this.streamIds = streamIds; + this.__explicitlySet__.add("streamIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails build() { + ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails model = + new ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails( + this.isEnabled, + this.coolOffPeriodInMinutes, + this.maxMoveRuAttempts, + this.maxMoveRuUnit, + this.mode, + this.actionType, + this.notificationTopicIds, + this.streamIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails model) { + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + if (model.wasPropertyExplicitlySet("coolOffPeriodInMinutes")) { + this.coolOffPeriodInMinutes(model.getCoolOffPeriodInMinutes()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuAttempts")) { + this.maxMoveRuAttempts(model.getMaxMoveRuAttempts()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuUnit")) { + this.maxMoveRuUnit(model.getMaxMoveRuUnit()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("streamIds")) { + this.streamIds(model.getStreamIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private final Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @return the value + **/ + public Integer getCoolOffPeriodInMinutes() { + return coolOffPeriodInMinutes; + } + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private final Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @return the value + **/ + public Integer getMaxMoveRuAttempts() { + return maxMoveRuAttempts; + } + + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + public enum MaxMoveRuUnit { + Hour("HOUR"), + Day("DAY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaxMoveRuUnit v : MaxMoveRuUnit.values()) { + map.put(v.getValue(), v); + } + } + + MaxMoveRuUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaxMoveRuUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid MaxMoveRuUnit: " + key); + } + }; + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private final MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @return the value + **/ + public MaxMoveRuUnit getMaxMoveRuUnit() { + return maxMoveRuUnit; + } + + /** + * Mode of autoResourceManagement execution. + **/ + public enum Mode { + Automatic("AUTOMATIC"), + Recommendation("RECOMMENDATION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Mode v : Mode.values()) { + map.put(v.getValue(), v); + } + } + + Mode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Mode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Mode: " + key); + } + }; + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @return the value + **/ + public Mode getMode() { + return mode; + } + + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + public enum ActionType { + Move("MOVE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + 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); + } + throw new IllegalArgumentException("Invalid ActionType: " + key); + } + }; + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private final java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @return the value + **/ + public java.util.List getStreamIds() { + return streamIds; + } + + @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("ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", coolOffPeriodInMinutes=").append(String.valueOf(this.coolOffPeriodInMinutes)); + sb.append(", maxMoveRuAttempts=").append(String.valueOf(this.maxMoveRuAttempts)); + sb.append(", maxMoveRuUnit=").append(String.valueOf(this.maxMoveRuUnit)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", streamIds=").append(String.valueOf(this.streamIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails other = + (ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals( + this.coolOffPeriodInMinutes, other.coolOffPeriodInMinutes) + && java.util.Objects.equals(this.maxMoveRuAttempts, other.maxMoveRuAttempts) + && java.util.Objects.equals(this.maxMoveRuUnit, other.maxMoveRuUnit) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.streamIds, other.streamIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = + (result * PRIME) + + (this.coolOffPeriodInMinutes == null + ? 43 + : this.coolOffPeriodInMinutes.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuAttempts == null ? 43 : this.maxMoveRuAttempts.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuUnit == null ? 43 : this.maxMoveRuUnit.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.streamIds == null ? 43 : this.streamIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmWalletDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmWalletDetails.java new file mode 100644 index 0000000000..70111b57fc --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmWalletDetails.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the request to configure wallet on global service manager(GSM) instances for a distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureDistributedAutonomousDatabaseGsmWalletDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureDistributedAutonomousDatabaseGsmWalletDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"certificateId", "caBundleId"}) + public ConfigureDistributedAutonomousDatabaseGsmWalletDetails( + String certificateId, String caBundleId) { + super(); + this.certificateId = certificateId; + this.caBundleId = caBundleId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster certificate. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateId") + private String certificateId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster certificate. + * @param certificateId the value to set + * @return this builder + **/ + public Builder certificateId(String certificateId) { + this.certificateId = certificateId; + this.__explicitlySet__.add("certificateId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ca bundle id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("caBundleId") + private String caBundleId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ca bundle id. + * @param caBundleId the value to set + * @return this builder + **/ + public Builder caBundleId(String caBundleId) { + this.caBundleId = caBundleId; + this.__explicitlySet__.add("caBundleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureDistributedAutonomousDatabaseGsmWalletDetails build() { + ConfigureDistributedAutonomousDatabaseGsmWalletDetails model = + new ConfigureDistributedAutonomousDatabaseGsmWalletDetails( + this.certificateId, this.caBundleId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigureDistributedAutonomousDatabaseGsmWalletDetails model) { + if (model.wasPropertyExplicitlySet("certificateId")) { + this.certificateId(model.getCertificateId()); + } + if (model.wasPropertyExplicitlySet("caBundleId")) { + this.caBundleId(model.getCaBundleId()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster certificate. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateId") + private final String certificateId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster certificate. + * @return the value + **/ + public String getCertificateId() { + return certificateId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ca bundle id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("caBundleId") + private final String caBundleId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ca bundle id. + * @return the value + **/ + public String getCaBundleId() { + return caBundleId; + } + + @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("ConfigureDistributedAutonomousDatabaseGsmWalletDetails("); + sb.append("super=").append(super.toString()); + sb.append("certificateId=").append(String.valueOf(this.certificateId)); + sb.append(", caBundleId=").append(String.valueOf(this.caBundleId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseGsmWalletDetails)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmWalletDetails other = + (ConfigureDistributedAutonomousDatabaseGsmWalletDetails) o; + return java.util.Objects.equals(this.certificateId, other.certificateId) + && java.util.Objects.equals(this.caBundleId, other.caBundleId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.certificateId == null ? 43 : this.certificateId.hashCode()); + result = (result * PRIME) + (this.caBundleId == null ? 43 : this.caBundleId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmsDetails.java new file mode 100644 index 0000000000..f1f255aeb9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedAutonomousDatabaseGsmsDetails.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the request to configure new global service manager(GSM) instances for the distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureDistributedAutonomousDatabaseGsmsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureDistributedAutonomousDatabaseGsmsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"oldGsmNames", "isLatestGsmImage"}) + public ConfigureDistributedAutonomousDatabaseGsmsDetails( + java.util.List oldGsmNames, Boolean isLatestGsmImage) { + super(); + this.oldGsmNames = oldGsmNames; + this.isLatestGsmImage = isLatestGsmImage; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldGsmNames") + private java.util.List oldGsmNames; + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + * @param oldGsmNames the value to set + * @return this builder + **/ + public Builder oldGsmNames(java.util.List oldGsmNames) { + this.oldGsmNames = oldGsmNames; + this.__explicitlySet__.add("oldGsmNames"); + return this; + } + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestGsmImage") + private Boolean isLatestGsmImage; + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + * @param isLatestGsmImage the value to set + * @return this builder + **/ + public Builder isLatestGsmImage(Boolean isLatestGsmImage) { + this.isLatestGsmImage = isLatestGsmImage; + this.__explicitlySet__.add("isLatestGsmImage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureDistributedAutonomousDatabaseGsmsDetails build() { + ConfigureDistributedAutonomousDatabaseGsmsDetails model = + new ConfigureDistributedAutonomousDatabaseGsmsDetails( + this.oldGsmNames, this.isLatestGsmImage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigureDistributedAutonomousDatabaseGsmsDetails model) { + if (model.wasPropertyExplicitlySet("oldGsmNames")) { + this.oldGsmNames(model.getOldGsmNames()); + } + if (model.wasPropertyExplicitlySet("isLatestGsmImage")) { + this.isLatestGsmImage(model.getIsLatestGsmImage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldGsmNames") + private final java.util.List oldGsmNames; + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + * @return the value + **/ + public java.util.List getOldGsmNames() { + return oldGsmNames; + } + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestGsmImage") + private final Boolean isLatestGsmImage; + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + * @return the value + **/ + public Boolean getIsLatestGsmImage() { + return isLatestGsmImage; + } + + @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("ConfigureDistributedAutonomousDatabaseGsmsDetails("); + sb.append("super=").append(super.toString()); + sb.append("oldGsmNames=").append(String.valueOf(this.oldGsmNames)); + sb.append(", isLatestGsmImage=").append(String.valueOf(this.isLatestGsmImage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseGsmsDetails)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmsDetails other = + (ConfigureDistributedAutonomousDatabaseGsmsDetails) o; + return java.util.Objects.equals(this.oldGsmNames, other.oldGsmNames) + && java.util.Objects.equals(this.isLatestGsmImage, other.isLatestGsmImage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.oldGsmNames == null ? 43 : this.oldGsmNames.hashCode()); + result = + (result * PRIME) + + (this.isLatestGsmImage == null ? 43 : this.isLatestGsmImage.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseAutoResourceManagementDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseAutoResourceManagementDetails.java new file mode 100644 index 0000000000..dadcde7f65 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseAutoResourceManagementDetails.java @@ -0,0 +1,540 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * AutoResourceManagement configuration details for the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureDistributedDatabaseAutoResourceManagementDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureDistributedDatabaseAutoResourceManagementDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEnabled", + "coolOffPeriodInMinutes", + "maxMoveRuAttempts", + "maxMoveRuUnit", + "mode", + "actionType", + "notificationTopicIds", + "streamIds" + }) + public ConfigureDistributedDatabaseAutoResourceManagementDetails( + Boolean isEnabled, + Integer coolOffPeriodInMinutes, + Integer maxMoveRuAttempts, + MaxMoveRuUnit maxMoveRuUnit, + Mode mode, + ActionType actionType, + java.util.List notificationTopicIds, + java.util.List streamIds) { + super(); + this.isEnabled = isEnabled; + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.maxMoveRuUnit = maxMoveRuUnit; + this.mode = mode; + this.actionType = actionType; + this.notificationTopicIds = notificationTopicIds; + this.streamIds = streamIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @param coolOffPeriodInMinutes the value to set + * @return this builder + **/ + public Builder coolOffPeriodInMinutes(Integer coolOffPeriodInMinutes) { + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.__explicitlySet__.add("coolOffPeriodInMinutes"); + return this; + } + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @param maxMoveRuAttempts the value to set + * @return this builder + **/ + public Builder maxMoveRuAttempts(Integer maxMoveRuAttempts) { + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.__explicitlySet__.add("maxMoveRuAttempts"); + return this; + } + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @param maxMoveRuUnit the value to set + * @return this builder + **/ + public Builder maxMoveRuUnit(MaxMoveRuUnit maxMoveRuUnit) { + this.maxMoveRuUnit = maxMoveRuUnit; + this.__explicitlySet__.add("maxMoveRuUnit"); + return this; + } + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @param mode the value to set + * @return this builder + **/ + public Builder mode(Mode mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @param streamIds the value to set + * @return this builder + **/ + public Builder streamIds(java.util.List streamIds) { + this.streamIds = streamIds; + this.__explicitlySet__.add("streamIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureDistributedDatabaseAutoResourceManagementDetails build() { + ConfigureDistributedDatabaseAutoResourceManagementDetails model = + new ConfigureDistributedDatabaseAutoResourceManagementDetails( + this.isEnabled, + this.coolOffPeriodInMinutes, + this.maxMoveRuAttempts, + this.maxMoveRuUnit, + this.mode, + this.actionType, + this.notificationTopicIds, + this.streamIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigureDistributedDatabaseAutoResourceManagementDetails model) { + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + if (model.wasPropertyExplicitlySet("coolOffPeriodInMinutes")) { + this.coolOffPeriodInMinutes(model.getCoolOffPeriodInMinutes()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuAttempts")) { + this.maxMoveRuAttempts(model.getMaxMoveRuAttempts()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuUnit")) { + this.maxMoveRuUnit(model.getMaxMoveRuUnit()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("streamIds")) { + this.streamIds(model.getStreamIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private final Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @return the value + **/ + public Integer getCoolOffPeriodInMinutes() { + return coolOffPeriodInMinutes; + } + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private final Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @return the value + **/ + public Integer getMaxMoveRuAttempts() { + return maxMoveRuAttempts; + } + + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + public enum MaxMoveRuUnit { + Hour("HOUR"), + Day("DAY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaxMoveRuUnit v : MaxMoveRuUnit.values()) { + map.put(v.getValue(), v); + } + } + + MaxMoveRuUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaxMoveRuUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid MaxMoveRuUnit: " + key); + } + }; + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private final MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @return the value + **/ + public MaxMoveRuUnit getMaxMoveRuUnit() { + return maxMoveRuUnit; + } + + /** + * Mode of autoResourceManagement execution. + **/ + public enum Mode { + Automatic("AUTOMATIC"), + Recommendation("RECOMMENDATION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Mode v : Mode.values()) { + map.put(v.getValue(), v); + } + } + + Mode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Mode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Mode: " + key); + } + }; + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @return the value + **/ + public Mode getMode() { + return mode; + } + + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + public enum ActionType { + Move("MOVE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + 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); + } + throw new IllegalArgumentException("Invalid ActionType: " + key); + } + }; + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private final java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @return the value + **/ + public java.util.List getStreamIds() { + return streamIds; + } + + @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("ConfigureDistributedDatabaseAutoResourceManagementDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", coolOffPeriodInMinutes=").append(String.valueOf(this.coolOffPeriodInMinutes)); + sb.append(", maxMoveRuAttempts=").append(String.valueOf(this.maxMoveRuAttempts)); + sb.append(", maxMoveRuUnit=").append(String.valueOf(this.maxMoveRuUnit)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", streamIds=").append(String.valueOf(this.streamIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseAutoResourceManagementDetails)) { + return false; + } + + ConfigureDistributedDatabaseAutoResourceManagementDetails other = + (ConfigureDistributedDatabaseAutoResourceManagementDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals( + this.coolOffPeriodInMinutes, other.coolOffPeriodInMinutes) + && java.util.Objects.equals(this.maxMoveRuAttempts, other.maxMoveRuAttempts) + && java.util.Objects.equals(this.maxMoveRuUnit, other.maxMoveRuUnit) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.streamIds, other.streamIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = + (result * PRIME) + + (this.coolOffPeriodInMinutes == null + ? 43 + : this.coolOffPeriodInMinutes.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuAttempts == null ? 43 : this.maxMoveRuAttempts.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuUnit == null ? 43 : this.maxMoveRuUnit.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.streamIds == null ? 43 : this.streamIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseGsmsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseGsmsDetails.java new file mode 100644 index 0000000000..ddd2ffe06f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ConfigureDistributedDatabaseGsmsDetails.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the request to configure new global service manager(GSM) instances for the distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureDistributedDatabaseGsmsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureDistributedDatabaseGsmsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"oldGsmNames", "isLatestGsmImage"}) + public ConfigureDistributedDatabaseGsmsDetails( + java.util.List oldGsmNames, Boolean isLatestGsmImage) { + super(); + this.oldGsmNames = oldGsmNames; + this.isLatestGsmImage = isLatestGsmImage; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldGsmNames") + private java.util.List oldGsmNames; + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + * @param oldGsmNames the value to set + * @return this builder + **/ + public Builder oldGsmNames(java.util.List oldGsmNames) { + this.oldGsmNames = oldGsmNames; + this.__explicitlySet__.add("oldGsmNames"); + return this; + } + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestGsmImage") + private Boolean isLatestGsmImage; + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + * @param isLatestGsmImage the value to set + * @return this builder + **/ + public Builder isLatestGsmImage(Boolean isLatestGsmImage) { + this.isLatestGsmImage = isLatestGsmImage; + this.__explicitlySet__.add("isLatestGsmImage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureDistributedDatabaseGsmsDetails build() { + ConfigureDistributedDatabaseGsmsDetails model = + new ConfigureDistributedDatabaseGsmsDetails( + this.oldGsmNames, this.isLatestGsmImage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigureDistributedDatabaseGsmsDetails model) { + if (model.wasPropertyExplicitlySet("oldGsmNames")) { + this.oldGsmNames(model.getOldGsmNames()); + } + if (model.wasPropertyExplicitlySet("isLatestGsmImage")) { + this.isLatestGsmImage(model.getIsLatestGsmImage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldGsmNames") + private final java.util.List oldGsmNames; + + /** + * Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + * @return the value + **/ + public java.util.List getOldGsmNames() { + return oldGsmNames; + } + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestGsmImage") + private final Boolean isLatestGsmImage; + + /** + * Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + * GSM instances. + * + * @return the value + **/ + public Boolean getIsLatestGsmImage() { + return isLatestGsmImage; + } + + @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("ConfigureDistributedDatabaseGsmsDetails("); + sb.append("super=").append(super.toString()); + sb.append("oldGsmNames=").append(String.valueOf(this.oldGsmNames)); + sb.append(", isLatestGsmImage=").append(String.valueOf(this.isLatestGsmImage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseGsmsDetails)) { + return false; + } + + ConfigureDistributedDatabaseGsmsDetails other = (ConfigureDistributedDatabaseGsmsDetails) o; + return java.util.Objects.equals(this.oldGsmNames, other.oldGsmNames) + && java.util.Objects.equals(this.isLatestGsmImage, other.isLatestGsmImage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.oldGsmNames == null ? 43 : this.oldGsmNames.hashCode()); + result = + (result * PRIME) + + (this.isLatestGsmImage == null ? 43 : this.isLatestGsmImage.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDatabaseDetails.java new file mode 100644 index 0000000000..b2122904a3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDatabaseDetails.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details for creating a distributed autonomous database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = CreateAutonomousCatalogDatabaseDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails.class, + name = "ADBD_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAutonomousCatalogDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CreateAutonomousCatalogDatabaseDetails() { + 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("CreateAutonomousCatalogDatabaseDetails("); + 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 CreateAutonomousCatalogDatabaseDetails)) { + return false; + } + + CreateAutonomousCatalogDatabaseDetails other = (CreateAutonomousCatalogDatabaseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed autonomous database type. + * Use ADBD_EXISTING_CLUSTER for an autonomous database on Dedicated Infrastructure that uses a pre-existing cluster. + * + **/ + public enum Source { + AdbdExistingCluster("ADBD_EXISTING_CLUSTER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + map.put(v.getValue(), v); + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Source: " + key); + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDetails.java new file mode 100644 index 0000000000..0c31a23051 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogDetails.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a distributed autonomous database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCatalogDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCatalogDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public CreateAutonomousCatalogDetails( + CreateAutonomousCatalogReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateAutonomousCatalogReplicaDetails originalReplica; + + public Builder originalReplica(CreateAutonomousCatalogReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * Details required to create data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the catalog. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCatalogDetails build() { + CreateAutonomousCatalogDetails model = + new CreateAutonomousCatalogDetails( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCatalogDetails model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateAutonomousCatalogReplicaDetails originalReplica; + + public CreateAutonomousCatalogReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * Details required to create data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the catalog. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateAutonomousCatalogDetails("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCatalogDetails)) { + return false; + } + + CreateAutonomousCatalogDetails other = (CreateAutonomousCatalogDetails) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogReplicaDetails.java new file mode 100644 index 0000000000..a972535a7b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCatalogReplicaDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a catalog replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCatalogReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCatalogReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public CreateAutonomousCatalogReplicaDetails( + String name, CreateAutonomousCatalogDatabaseDetails database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private CreateAutonomousCatalogDatabaseDetails database; + + public Builder database(CreateAutonomousCatalogDatabaseDetails database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCatalogReplicaDetails build() { + CreateAutonomousCatalogReplicaDetails model = + new CreateAutonomousCatalogReplicaDetails(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCatalogReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final CreateAutonomousCatalogDatabaseDetails database; + + public CreateAutonomousCatalogDatabaseDetails getDatabase() { + return database; + } + + @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("CreateAutonomousCatalogReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCatalogReplicaDetails)) { + return false; + } + + CreateAutonomousCatalogReplicaDetails other = (CreateAutonomousCatalogReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceDetails.java new file mode 100644 index 0000000000..ddac3d62bb --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceDetails.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a composite data guard shard space for a Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCompositeDataGuardShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCompositeDataGuardShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "originalReplica", + "dataGuardReplicas" + }) + public CreateAutonomousCompositeDataGuardShardSpaceDetails( + String name, + Integer chunkCount, + CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails originalReplica, + java.util.List + dataGuardReplicas) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails originalReplica; + + public Builder originalReplica( + CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica for the shard being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List + dataGuardReplicas; + + /** + * The details of data guard replica for the shard being created. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List + dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCompositeDataGuardShardSpaceDetails build() { + CreateAutonomousCompositeDataGuardShardSpaceDetails model = + new CreateAutonomousCompositeDataGuardShardSpaceDetails( + this.name, + this.chunkCount, + this.originalReplica, + this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCompositeDataGuardShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails originalReplica; + + public CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica for the shard being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List + dataGuardReplicas; + + /** + * The details of data guard replica for the shard being created. + * @return the value + **/ + public java.util.List + getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateAutonomousCompositeDataGuardShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCompositeDataGuardShardSpaceDetails)) { + return false; + } + + CreateAutonomousCompositeDataGuardShardSpaceDetails other = + (CreateAutonomousCompositeDataGuardShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails.java new file mode 100644 index 0000000000..59363c7dd2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails.java @@ -0,0 +1,191 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a composite data guard shard space replica for a Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails( + String name, + java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails build() { + CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails model = + new CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails( + this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails)) { + return false; + } + + CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails other = + (CreateAutonomousCompositeDataGuardShardSpaceReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeRaftShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeRaftShardSpaceDetails.java new file mode 100644 index 0000000000..e91be131b5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeRaftShardSpaceDetails.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a composite raft shard space for a Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCompositeRaftShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCompositeRaftShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "replicationUnitCount", + "raftClusters" + }) + public CreateAutonomousCompositeRaftShardSpaceDetails( + String name, + Integer chunkCount, + Integer replicationUnitCount, + java.util.List raftClusters) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.replicationUnitCount = replicationUnitCount; + this.raftClusters = raftClusters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @param replicationUnitCount the value to set + * @return this builder + **/ + public Builder replicationUnitCount(Integer replicationUnitCount) { + this.replicationUnitCount = replicationUnitCount; + this.__explicitlySet__.add("replicationUnitCount"); + return this; + } + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @param raftClusters the value to set + * @return this builder + **/ + public Builder raftClusters( + java.util.List + raftClusters) { + this.raftClusters = raftClusters; + this.__explicitlySet__.add("raftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCompositeRaftShardSpaceDetails build() { + CreateAutonomousCompositeRaftShardSpaceDetails model = + new CreateAutonomousCompositeRaftShardSpaceDetails( + this.name, + this.chunkCount, + this.replicationUnitCount, + this.raftClusters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCompositeRaftShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("replicationUnitCount")) { + this.replicationUnitCount(model.getReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("raftClusters")) { + this.raftClusters(model.getRaftClusters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private final Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @return the value + **/ + public Integer getReplicationUnitCount() { + return replicationUnitCount; + } + + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private final java.util.List + raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @return the value + **/ + public java.util.List getRaftClusters() { + return raftClusters; + } + + @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("CreateAutonomousCompositeRaftShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", replicationUnitCount=").append(String.valueOf(this.replicationUnitCount)); + sb.append(", raftClusters=").append(String.valueOf(this.raftClusters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCompositeRaftShardSpaceDetails)) { + return false; + } + + CreateAutonomousCompositeRaftShardSpaceDetails other = + (CreateAutonomousCompositeRaftShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.replicationUnitCount, other.replicationUnitCount) + && java.util.Objects.equals(this.raftClusters, other.raftClusters) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.replicationUnitCount == null + ? 43 + : this.replicationUnitCount.hashCode()); + result = (result * PRIME) + (this.raftClusters == null ? 43 : this.raftClusters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeShardSpaceRaftClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeShardSpaceRaftClusterDetails.java new file mode 100644 index 0000000000..2825e419fe --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousCompositeShardSpaceRaftClusterDetails.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create raft clusters for a composite shard space. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousCompositeShardSpaceRaftClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousCompositeShardSpaceRaftClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public CreateAutonomousCompositeShardSpaceRaftClusterDetails( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousCompositeShardSpaceRaftClusterDetails build() { + CreateAutonomousCompositeShardSpaceRaftClusterDetails model = + new CreateAutonomousCompositeShardSpaceRaftClusterDetails( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousCompositeShardSpaceRaftClusterDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + map.put(v.getValue(), v); + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RuMode: " + key); + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateAutonomousCompositeShardSpaceRaftClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousCompositeShardSpaceRaftClusterDetails)) { + return false; + } + + CreateAutonomousCompositeShardSpaceRaftClusterDetails other = + (CreateAutonomousCompositeShardSpaceRaftClusterDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardDatabaseDetails.java new file mode 100644 index 0000000000..5248a77fcc --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardDatabaseDetails.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a system data guard shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousSystemDataGuardDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousSystemDataGuardDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public CreateAutonomousSystemDataGuardDatabaseDetails( + CreateAutonomousSystemDataGuardReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateAutonomousSystemDataGuardReplicaDetails originalReplica; + + public Builder originalReplica( + CreateAutonomousSystemDataGuardReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details required to create system data guard replicas. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details required to create system data guard replicas. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousSystemDataGuardDatabaseDetails build() { + CreateAutonomousSystemDataGuardDatabaseDetails model = + new CreateAutonomousSystemDataGuardDatabaseDetails( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousSystemDataGuardDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateAutonomousSystemDataGuardReplicaDetails originalReplica; + + public CreateAutonomousSystemDataGuardReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details required to create system data guard replicas. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details required to create system data guard replicas. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateAutonomousSystemDataGuardDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousSystemDataGuardDatabaseDetails)) { + return false; + } + + CreateAutonomousSystemDataGuardDatabaseDetails other = + (CreateAutonomousSystemDataGuardDatabaseDetails) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardReplicaDetails.java new file mode 100644 index 0000000000..174466a65d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemDataGuardReplicaDetails.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a system data guard replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousSystemDataGuardReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousSystemDataGuardReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public CreateAutonomousSystemDataGuardReplicaDetails( + String name, + java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousSystemDataGuardReplicaDetails build() { + CreateAutonomousSystemDataGuardReplicaDetails model = + new CreateAutonomousSystemDataGuardReplicaDetails(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousSystemDataGuardReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateAutonomousSystemDataGuardReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousSystemDataGuardReplicaDetails)) { + return false; + } + + CreateAutonomousSystemDataGuardReplicaDetails other = + (CreateAutonomousSystemDataGuardReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemRaftClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemRaftClusterDetails.java new file mode 100644 index 0000000000..fa3c5938c0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousSystemRaftClusterDetails.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create system raft cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousSystemRaftClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousSystemRaftClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public CreateAutonomousSystemRaftClusterDetails( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousSystemRaftClusterDetails build() { + CreateAutonomousSystemRaftClusterDetails model = + new CreateAutonomousSystemRaftClusterDetails( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousSystemRaftClusterDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + map.put(v.getValue(), v); + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RuMode: " + key); + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateAutonomousSystemRaftClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousSystemRaftClusterDetails)) { + return false; + } + + CreateAutonomousSystemRaftClusterDetails other = + (CreateAutonomousSystemRaftClusterDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceDetails.java new file mode 100644 index 0000000000..a179b4f938 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceDetails.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a user shard space. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousUserShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousUserShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "originalReplica", "dataGuardReplicas"}) + public CreateAutonomousUserShardSpaceDetails( + String name, + CreateAutonomousUserShardSpaceReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateAutonomousUserShardSpaceReplicaDetails originalReplica; + + public Builder originalReplica( + CreateAutonomousUserShardSpaceReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * Details required to create data guard replicas for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the user shard space. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousUserShardSpaceDetails build() { + CreateAutonomousUserShardSpaceDetails model = + new CreateAutonomousUserShardSpaceDetails( + this.name, this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousUserShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateAutonomousUserShardSpaceReplicaDetails originalReplica; + + public CreateAutonomousUserShardSpaceReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * Details required to create data guard replicas for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the user shard space. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateAutonomousUserShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousUserShardSpaceDetails)) { + return false; + } + + CreateAutonomousUserShardSpaceDetails other = (CreateAutonomousUserShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceReplicaDetails.java new file mode 100644 index 0000000000..f56d2af9b7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateAutonomousUserShardSpaceReplicaDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a user shard space replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousUserShardSpaceReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousUserShardSpaceReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public CreateAutonomousUserShardSpaceReplicaDetails( + String name, CreateDistributedAutonomousDatabaseShardDatabaseDetails database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private CreateDistributedAutonomousDatabaseShardDatabaseDetails database; + + public Builder database(CreateDistributedAutonomousDatabaseShardDatabaseDetails database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousUserShardSpaceReplicaDetails build() { + CreateAutonomousUserShardSpaceReplicaDetails model = + new CreateAutonomousUserShardSpaceReplicaDetails(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousUserShardSpaceReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final CreateDistributedAutonomousDatabaseShardDatabaseDetails database; + + public CreateDistributedAutonomousDatabaseShardDatabaseDetails getDatabase() { + return database; + } + + @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("CreateAutonomousUserShardSpaceReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousUserShardSpaceReplicaDetails)) { + return false; + } + + CreateAutonomousUserShardSpaceReplicaDetails other = + (CreateAutonomousUserShardSpaceReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceDetails.java new file mode 100644 index 0000000000..c8dbc7d5fa --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceDetails.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite data guard shard space creation details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCompositeDataGuardShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCompositeDataGuardShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "originalReplica", + "dataGuardReplicas" + }) + public CreateCompositeDataGuardShardSpaceDetails( + String name, + Integer chunkCount, + CreateCompositeDataGuardShardSpaceReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateCompositeDataGuardShardSpaceReplicaDetails originalReplica; + + public Builder originalReplica( + CreateCompositeDataGuardShardSpaceReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica for the shard being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replica for the shard being created. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List + dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCompositeDataGuardShardSpaceDetails build() { + CreateCompositeDataGuardShardSpaceDetails model = + new CreateCompositeDataGuardShardSpaceDetails( + this.name, + this.chunkCount, + this.originalReplica, + this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCompositeDataGuardShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateCompositeDataGuardShardSpaceReplicaDetails originalReplica; + + public CreateCompositeDataGuardShardSpaceReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica for the shard being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List + dataGuardReplicas; + + /** + * The details of data guard replica for the shard being created. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateCompositeDataGuardShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompositeDataGuardShardSpaceDetails)) { + return false; + } + + CreateCompositeDataGuardShardSpaceDetails other = + (CreateCompositeDataGuardShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceReplicaDetails.java new file mode 100644 index 0000000000..64203f78ed --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeDataGuardShardSpaceReplicaDetails.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite data guard shard space replica creation details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCompositeDataGuardShardSpaceReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCompositeDataGuardShardSpaceReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public CreateCompositeDataGuardShardSpaceReplicaDetails( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCompositeDataGuardShardSpaceReplicaDetails build() { + CreateCompositeDataGuardShardSpaceReplicaDetails model = + new CreateCompositeDataGuardShardSpaceReplicaDetails(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCompositeDataGuardShardSpaceReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The details of composite data guard shard space replica databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of composite data guard shard space replica databases. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateCompositeDataGuardShardSpaceReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompositeDataGuardShardSpaceReplicaDetails)) { + return false; + } + + CreateCompositeDataGuardShardSpaceReplicaDetails other = + (CreateCompositeDataGuardShardSpaceReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeRaftShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeRaftShardSpaceDetails.java new file mode 100644 index 0000000000..ae521160a5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeRaftShardSpaceDetails.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database composite raft shard space creation details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCompositeRaftShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCompositeRaftShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "chunkCount", + "replicationUnitCount", + "raftClusters" + }) + public CreateCompositeRaftShardSpaceDetails( + String name, + Integer chunkCount, + Integer replicationUnitCount, + java.util.List raftClusters) { + super(); + this.name = name; + this.chunkCount = chunkCount; + this.replicationUnitCount = replicationUnitCount; + this.raftClusters = raftClusters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @param chunkCount the value to set + * @return this builder + **/ + public Builder chunkCount(Integer chunkCount) { + this.chunkCount = chunkCount; + this.__explicitlySet__.add("chunkCount"); + return this; + } + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @param replicationUnitCount the value to set + * @return this builder + **/ + public Builder replicationUnitCount(Integer replicationUnitCount) { + this.replicationUnitCount = replicationUnitCount; + this.__explicitlySet__.add("replicationUnitCount"); + return this; + } + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @param raftClusters the value to set + * @return this builder + **/ + public Builder raftClusters( + java.util.List raftClusters) { + this.raftClusters = raftClusters; + this.__explicitlySet__.add("raftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCompositeRaftShardSpaceDetails build() { + CreateCompositeRaftShardSpaceDetails model = + new CreateCompositeRaftShardSpaceDetails( + this.name, + this.chunkCount, + this.replicationUnitCount, + this.raftClusters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCompositeRaftShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("chunkCount")) { + this.chunkCount(model.getChunkCount()); + } + if (model.wasPropertyExplicitlySet("replicationUnitCount")) { + this.replicationUnitCount(model.getReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("raftClusters")) { + this.raftClusters(model.getRaftClusters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Count of chunks associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chunkCount") + private final Integer chunkCount; + + /** + * Count of chunks associated with the shard space. + * @return the value + **/ + public Integer getChunkCount() { + return chunkCount; + } + + /** + * Number of replication units in the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnitCount") + private final Integer replicationUnitCount; + + /** + * Number of replication units in the shard space. + * @return the value + **/ + public Integer getReplicationUnitCount() { + return replicationUnitCount; + } + + /** + * The details of raft clusters associated with the shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftClusters") + private final java.util.List raftClusters; + + /** + * The details of raft clusters associated with the shard space. + * @return the value + **/ + public java.util.List getRaftClusters() { + return raftClusters; + } + + @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("CreateCompositeRaftShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", chunkCount=").append(String.valueOf(this.chunkCount)); + sb.append(", replicationUnitCount=").append(String.valueOf(this.replicationUnitCount)); + sb.append(", raftClusters=").append(String.valueOf(this.raftClusters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompositeRaftShardSpaceDetails)) { + return false; + } + + CreateCompositeRaftShardSpaceDetails other = (CreateCompositeRaftShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.chunkCount, other.chunkCount) + && java.util.Objects.equals(this.replicationUnitCount, other.replicationUnitCount) + && java.util.Objects.equals(this.raftClusters, other.raftClusters) + && 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.chunkCount == null ? 43 : this.chunkCount.hashCode()); + result = + (result * PRIME) + + (this.replicationUnitCount == null + ? 43 + : this.replicationUnitCount.hashCode()); + result = (result * PRIME) + (this.raftClusters == null ? 43 : this.raftClusters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeShardSpaceRaftClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeShardSpaceRaftClusterDetails.java new file mode 100644 index 0000000000..4cd21bda64 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateCompositeShardSpaceRaftClusterDetails.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Raft clusters details required for creation of composite shard spaces. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCompositeShardSpaceRaftClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCompositeShardSpaceRaftClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public CreateCompositeShardSpaceRaftClusterDetails( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCompositeShardSpaceRaftClusterDetails build() { + CreateCompositeShardSpaceRaftClusterDetails model = + new CreateCompositeShardSpaceRaftClusterDetails( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCompositeShardSpaceRaftClusterDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + map.put(v.getValue(), v); + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RuMode: " + key); + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * The details of databases associated with the composite shard space raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * The details of databases associated with the composite shard space raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateCompositeShardSpaceRaftClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompositeShardSpaceRaftClusterDetails)) { + return false; + } + + CreateCompositeShardSpaceRaftClusterDetails other = + (CreateCompositeShardSpaceRaftClusterDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails.java new file mode 100644 index 0000000000..8932f4f90a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails.java @@ -0,0 +1,732 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed autonomous database catalog using an existing ADB-D VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails + extends CreateAutonomousCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The admin password for the catalog associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with the distributed autonomous database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the catalog database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the catalog database. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @param isAutoScalingEnabled the value to set + * @return this builder + **/ + public Builder isAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.__explicitlySet__.add("isAutoScalingEnabled"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + * @param cloudAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder cloudAutonomousVmClusterId(String cloudAutonomousVmClusterId) { + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.__explicitlySet__.add("cloudAutonomousVmClusterId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + * @param okvKeyStoreId the value to set + * @return this builder + **/ + public Builder okvKeyStoreId(String okvKeyStoreId) { + this.okvKeyStoreId = okvKeyStoreId; + this.__explicitlySet__.add("okvKeyStoreId"); + return this; + } + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @param okvEndPointGroupName the value to set + * @return this builder + **/ + public Builder okvEndPointGroupName(String okvEndPointGroupName) { + this.okvEndPointGroupName = okvEndPointGroupName; + this.__explicitlySet__.add("okvEndPointGroupName"); + return this; + } + /** + * The protectionMode for the catalog peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protectionMode for the catalog peer. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedAutonomousDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @param fastStartFailOverLagLimitInSeconds the value to set + * @return this builder + **/ + public Builder fastStartFailOverLagLimitInSeconds( + Integer fastStartFailOverLagLimitInSeconds) { + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.__explicitlySet__.add("fastStartFailOverLagLimitInSeconds"); + return this; + } + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + * @param standbyMaintenanceBufferInDays the value to set + * @return this builder + **/ + public Builder standbyMaintenanceBufferInDays(Integer standbyMaintenanceBufferInDays) { + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.__explicitlySet__.add("standbyMaintenanceBufferInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails build() { + CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails model = + new CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails( + this.adminPassword, + this.computeCount, + this.dataStorageSizeInGbs, + this.isAutoScalingEnabled, + this.cloudAutonomousVmClusterId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.okvKeyStoreId, + this.okvEndPointGroupName, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.standbyMaintenanceBufferInDays); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy( + CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabled")) { + this.isAutoScalingEnabled(model.getIsAutoScalingEnabled()); + } + if (model.wasPropertyExplicitlySet("cloudAutonomousVmClusterId")) { + this.cloudAutonomousVmClusterId(model.getCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("okvKeyStoreId")) { + this.okvKeyStoreId(model.getOkvKeyStoreId()); + } + if (model.wasPropertyExplicitlySet("okvEndPointGroupName")) { + this.okvEndPointGroupName(model.getOkvEndPointGroupName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("standbyMaintenanceBufferInDays")) { + this.standbyMaintenanceBufferInDays(model.getStandbyMaintenanceBufferInDays()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails( + String adminPassword, + Float computeCount, + Double dataStorageSizeInGbs, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails( + char[] adminPassword, + Float computeCount, + Double dataStorageSizeInGbs, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays) { + super(); + this.adminPassword = adminPassword; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + } + + /** + * The admin password for the catalog associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with the distributed autonomous database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with the distributed autonomous database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the catalog database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the catalog database. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private final Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @return the value + **/ + public Boolean getIsAutoScalingEnabled() { + return isAutoScalingEnabled; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private final String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + * @return the value + **/ + public String getCloudAutonomousVmClusterId() { + return cloudAutonomousVmClusterId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private final String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + * @return the value + **/ + public String getOkvKeyStoreId() { + return okvKeyStoreId; + } + + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private final String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @return the value + **/ + public String getOkvEndPointGroupName() { + return okvEndPointGroupName; + } + + /** + * The protectionMode for the catalog peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protectionMode for the catalog peer. + * @return the value + **/ + public DistributedAutonomousDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private final Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + * @return the value + **/ + public Integer getStandbyMaintenanceBufferInDays() { + return standbyMaintenanceBufferInDays; + } + + @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("CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); + sb.append(", cloudAutonomousVmClusterId=") + .append(String.valueOf(this.cloudAutonomousVmClusterId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", okvKeyStoreId=").append(String.valueOf(this.okvKeyStoreId)); + sb.append(", okvEndPointGroupName=").append(String.valueOf(this.okvEndPointGroupName)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", standbyMaintenanceBufferInDays=") + .append(String.valueOf(this.standbyMaintenanceBufferInDays)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails)) { + return false; + } + + CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails other = + (CreateDistributedAutonomousDatabaseCatalogWithDedicatedInfraDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) + && java.util.Objects.equals( + this.cloudAutonomousVmClusterId, other.cloudAutonomousVmClusterId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.okvKeyStoreId, other.okvKeyStoreId) + && java.util.Objects.equals(this.okvEndPointGroupName, other.okvEndPointGroupName) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals( + this.standbyMaintenanceBufferInDays, other.standbyMaintenanceBufferInDays) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.hashCode()); + result = + (result * PRIME) + + (this.isAutoScalingEnabled == null + ? 43 + : this.isAutoScalingEnabled.hashCode()); + result = + (result * PRIME) + + (this.cloudAutonomousVmClusterId == null + ? 43 + : this.cloudAutonomousVmClusterId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.okvKeyStoreId == null ? 43 : this.okvKeyStoreId.hashCode()); + result = + (result * PRIME) + + (this.okvEndPointGroupName == null + ? 43 + : this.okvEndPointGroupName.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = + (result * PRIME) + + (this.standbyMaintenanceBufferInDays == null + ? 43 + : this.standbyMaintenanceBufferInDays.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseDetails.java new file mode 100644 index 0000000000..6b9f76731e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseDetails.java @@ -0,0 +1,1257 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required for creation of the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedAutonomousDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "databaseVersion", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "dbWorkloadType", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "systemChunkCount", + "systemRaftReplicationUnitCount", + "compositeRaftShardSpaces", + "compositeDataGuardShardSpaces", + "systemRaftClusters", + "systemDataGuardDatabases", + "userShardSpaces", + "catalogDetails", + "dbBackupConfig", + "vcnNsgIds", + "freeformTags", + "definedTags" + }) + public CreateDistributedAutonomousDatabaseDetails( + String compartmentId, + String displayName, + String databaseVersion, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + DbWorkloadType dbWorkloadType, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer systemChunkCount, + Integer systemRaftReplicationUnitCount, + java.util.List compositeRaftShardSpaces, + java.util.List + compositeDataGuardShardSpaces, + java.util.List systemRaftClusters, + CreateAutonomousSystemDataGuardDatabaseDetails systemDataGuardDatabases, + java.util.List userShardSpaces, + java.util.List catalogDetails, + DistributedAutonomousDbBackupConfig dbBackupConfig, + java.util.List vcnNsgIds, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.databaseVersion = databaseVersion; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.dbWorkloadType = dbWorkloadType; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.systemChunkCount = systemChunkCount; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.systemRaftClusters = systemRaftClusters; + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.userShardSpaces = userShardSpaces; + this.catalogDetails = catalogDetails; + this.dbBackupConfig = dbBackupConfig; + this.vcnNsgIds = vcnNsgIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private DbWorkloadType dbWorkloadType; + + /** + * Possible workload types. Currently only OLTP workload type is supported. + * @param dbWorkloadType the value to set + * @return this builder + **/ + public Builder dbWorkloadType(DbWorkloadType dbWorkloadType) { + this.dbWorkloadType = dbWorkloadType; + this.__explicitlySet__.add("dbWorkloadType"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The listener port number for the Globally distributed autonomous database. The listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. The listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. + * + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for Globally distributed autonomous database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. The listenerPortTls is mandatory + * for dedicated infrastructure based distributed autonomous databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed autonomous database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. The listenerPortTls is mandatory + * for dedicated infrastructure based distributed autonomous databases. + * + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * Ons local port number for Globally distributed autonomous database. The onsPortLocal has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * Ons local port number for Globally distributed autonomous database. The onsPortLocal has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * Ons remote port number for Globally distributed autonomous database. The onsPortRemote has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * Ons remote port number for Globally distributed autonomous database. The onsPortRemote has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private java.util.List + compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @param compositeRaftShardSpaces the value to set + * @return this builder + **/ + public Builder compositeRaftShardSpaces( + java.util.List + compositeRaftShardSpaces) { + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.__explicitlySet__.add("compositeRaftShardSpaces"); + return this; + } + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @param compositeDataGuardShardSpaces the value to set + * @return this builder + **/ + public Builder compositeDataGuardShardSpaces( + java.util.List + compositeDataGuardShardSpaces) { + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.__explicitlySet__.add("compositeDataGuardShardSpaces"); + return this; + } + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @param systemRaftClusters the value to set + * @return this builder + **/ + public Builder systemRaftClusters( + java.util.List systemRaftClusters) { + this.systemRaftClusters = systemRaftClusters; + this.__explicitlySet__.add("systemRaftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private CreateAutonomousSystemDataGuardDatabaseDetails systemDataGuardDatabases; + + public Builder systemDataGuardDatabases( + CreateAutonomousSystemDataGuardDatabaseDetails systemDataGuardDatabases) { + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.__explicitlySet__.add("systemDataGuardDatabases"); + return this; + } + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @param userShardSpaces the value to set + * @return this builder + **/ + public Builder userShardSpaces( + java.util.List userShardSpaces) { + this.userShardSpaces = userShardSpaces; + this.__explicitlySet__.add("userShardSpaces"); + return this; + } + /** + * Collection of catalog for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private java.util.List catalogDetails; + + /** + * Collection of catalog for the Globally distributed autonomous database. + * @param catalogDetails the value to set + * @return this builder + **/ + public Builder catalogDetails( + java.util.List catalogDetails) { + this.catalogDetails = catalogDetails; + this.__explicitlySet__.add("catalogDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedAutonomousDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedAutonomousDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + /** + * The list of network security group (NSG) details to be associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the distributed autonomous database. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 CreateDistributedAutonomousDatabaseDetails build() { + CreateDistributedAutonomousDatabaseDetails model = + new CreateDistributedAutonomousDatabaseDetails( + this.compartmentId, + this.displayName, + this.databaseVersion, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.dbWorkloadType, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.systemChunkCount, + this.systemRaftReplicationUnitCount, + this.compositeRaftShardSpaces, + this.compositeDataGuardShardSpaces, + this.systemRaftClusters, + this.systemDataGuardDatabases, + this.userShardSpaces, + this.catalogDetails, + this.dbBackupConfig, + this.vcnNsgIds, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedAutonomousDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("dbWorkloadType")) { + this.dbWorkloadType(model.getDbWorkloadType()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("compositeRaftShardSpaces")) { + this.compositeRaftShardSpaces(model.getCompositeRaftShardSpaces()); + } + if (model.wasPropertyExplicitlySet("compositeDataGuardShardSpaces")) { + this.compositeDataGuardShardSpaces(model.getCompositeDataGuardShardSpaces()); + } + if (model.wasPropertyExplicitlySet("systemRaftClusters")) { + this.systemRaftClusters(model.getSystemRaftClusters()); + } + if (model.wasPropertyExplicitlySet("systemDataGuardDatabases")) { + this.systemDataGuardDatabases(model.getSystemDataGuardDatabases()); + } + if (model.wasPropertyExplicitlySet("userShardSpaces")) { + this.userShardSpaces(model.getUserShardSpaces()); + } + if (model.wasPropertyExplicitlySet("catalogDetails")) { + this.catalogDetails(model.getCatalogDetails()); + } + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + public enum DbWorkloadType { + Oltp("OLTP"), + Dw("DW"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbWorkloadType v : DbWorkloadType.values()) { + map.put(v.getValue(), v); + } + } + + DbWorkloadType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbWorkloadType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid DbWorkloadType: " + key); + } + }; + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private final DbWorkloadType dbWorkloadType; + + /** + * Possible workload types. Currently only OLTP workload type is supported. + * @return the value + **/ + public DbWorkloadType getDbWorkloadType() { + return dbWorkloadType; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The listener port number for the Globally distributed autonomous database. The listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. The listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. + * + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for Globally distributed autonomous database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. The listenerPortTls is mandatory + * for dedicated infrastructure based distributed autonomous databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed autonomous database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed autonomous databases. Same port number + * should not be re-used for any other distributed autonomous database. The listenerPortTls is mandatory + * for dedicated infrastructure based distributed autonomous databases. + * + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * Ons local port number for Globally distributed autonomous database. The onsPortLocal has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * Ons local port number for Globally distributed autonomous database. The onsPortLocal has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * Ons remote port number for Globally distributed autonomous database. The onsPortRemote has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * Ons remote port number for Globally distributed autonomous database. The onsPortRemote has to be unique for + * a customer tenancy across all distributed autonomous databases. Same port number should not be re-used for + * any other distributed autonomous database. + * + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private final java.util.List + compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @return the value + **/ + public java.util.List + getCompositeRaftShardSpaces() { + return compositeRaftShardSpaces; + } + + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private final java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @return the value + **/ + public java.util.List + getCompositeDataGuardShardSpaces() { + return compositeDataGuardShardSpaces; + } + + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private final java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @return the value + **/ + public java.util.List getSystemRaftClusters() { + return systemRaftClusters; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private final CreateAutonomousSystemDataGuardDatabaseDetails systemDataGuardDatabases; + + public CreateAutonomousSystemDataGuardDatabaseDetails getSystemDataGuardDatabases() { + return systemDataGuardDatabases; + } + + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private final java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @return the value + **/ + public java.util.List getUserShardSpaces() { + return userShardSpaces; + } + + /** + * Collection of catalog for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private final java.util.List catalogDetails; + + /** + * Collection of catalog for the Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getCatalogDetails() { + return catalogDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedAutonomousDbBackupConfig dbBackupConfig; + + public DistributedAutonomousDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + /** + * The list of network security group (NSG) details to be associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the distributed autonomous database. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("CreateDistributedAutonomousDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", dbWorkloadType=").append(String.valueOf(this.dbWorkloadType)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", compositeRaftShardSpaces=") + .append(String.valueOf(this.compositeRaftShardSpaces)); + sb.append(", compositeDataGuardShardSpaces=") + .append(String.valueOf(this.compositeDataGuardShardSpaces)); + sb.append(", systemRaftClusters=").append(String.valueOf(this.systemRaftClusters)); + sb.append(", systemDataGuardDatabases=") + .append(String.valueOf(this.systemDataGuardDatabases)); + sb.append(", userShardSpaces=").append(String.valueOf(this.userShardSpaces)); + sb.append(", catalogDetails=").append(String.valueOf(this.catalogDetails)); + sb.append(", dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + 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 CreateDistributedAutonomousDatabaseDetails)) { + return false; + } + + CreateDistributedAutonomousDatabaseDetails other = + (CreateDistributedAutonomousDatabaseDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.dbWorkloadType, other.dbWorkloadType) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals( + this.compositeRaftShardSpaces, other.compositeRaftShardSpaces) + && java.util.Objects.equals( + this.compositeDataGuardShardSpaces, other.compositeDataGuardShardSpaces) + && java.util.Objects.equals(this.systemRaftClusters, other.systemRaftClusters) + && java.util.Objects.equals( + this.systemDataGuardDatabases, other.systemDataGuardDatabases) + && java.util.Objects.equals(this.userShardSpaces, other.userShardSpaces) + && java.util.Objects.equals(this.catalogDetails, other.catalogDetails) + && java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.databaseVersion == null ? 43 : this.databaseVersion.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = + (result * PRIME) + + (this.dbWorkloadType == null ? 43 : this.dbWorkloadType.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = + (result * PRIME) + + (this.compositeRaftShardSpaces == null + ? 43 + : this.compositeRaftShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.compositeDataGuardShardSpaces == null + ? 43 + : this.compositeDataGuardShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.systemRaftClusters == null + ? 43 + : this.systemRaftClusters.hashCode()); + result = + (result * PRIME) + + (this.systemDataGuardDatabases == null + ? 43 + : this.systemDataGuardDatabases.hashCode()); + result = + (result * PRIME) + + (this.userShardSpaces == null ? 43 : this.userShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.catalogDetails == null ? 43 : this.catalogDetails.hashCode()); + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardDatabaseDetails.java new file mode 100644 index 0000000000..e9cc9242c1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardDatabaseDetails.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details for creating a distributed autonomous database shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = CreateDistributedAutonomousDatabaseShardDatabaseDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails.class, + name = "ADBD_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateDistributedAutonomousDatabaseShardDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CreateDistributedAutonomousDatabaseShardDatabaseDetails() { + 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("CreateDistributedAutonomousDatabaseShardDatabaseDetails("); + 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 CreateDistributedAutonomousDatabaseShardDatabaseDetails)) { + return false; + } + + CreateDistributedAutonomousDatabaseShardDatabaseDetails other = + (CreateDistributedAutonomousDatabaseShardDatabaseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed autonomous database type. + * Use ADBD_EXISTING_CLUSTER for an autonomous database on Dedicated Infrastructure that uses a pre-existing cluster. + * + **/ + public enum Source { + AdbdExistingCluster("ADBD_EXISTING_CLUSTER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + map.put(v.getValue(), v); + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Source: " + key); + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails.java new file mode 100644 index 0000000000..2a4ed8ad9b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails.java @@ -0,0 +1,775 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed autonomous database shard using an existing ADB-D VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails + extends CreateDistributedAutonomousDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Admin password for shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * Admin password for shard database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The compute count for the shard database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the shard database. It has to be in multiples of 2. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the shard database. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * The shard space name for the shard database. Shard space for an existing shard cannot be changed once the shard is created. + * The shard space name is used when creating new shards. For user-defined sharding, every shard must have a unique + * shard space name. For system-defined sharding, a shard space name is not required. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardSpaceName") + private String shardSpaceName; + + /** + * The shard space name for the shard database. Shard space for an existing shard cannot be changed once the shard is created. + * The shard space name is used when creating new shards. For user-defined sharding, every shard must have a unique + * shard space name. For system-defined sharding, a shard space name is not required. + * + * @param shardSpaceName the value to set + * @return this builder + **/ + public Builder shardSpaceName(String shardSpaceName) { + this.shardSpaceName = shardSpaceName; + this.__explicitlySet__.add("shardSpaceName"); + return this; + } + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @param isAutoScalingEnabled the value to set + * @return this builder + **/ + public Builder isAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.__explicitlySet__.add("isAutoScalingEnabled"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * @param cloudAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder cloudAutonomousVmClusterId(String cloudAutonomousVmClusterId) { + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.__explicitlySet__.add("cloudAutonomousVmClusterId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + * @param okvKeyStoreId the value to set + * @return this builder + **/ + public Builder okvKeyStoreId(String okvKeyStoreId) { + this.okvKeyStoreId = okvKeyStoreId; + this.__explicitlySet__.add("okvKeyStoreId"); + return this; + } + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @param okvEndPointGroupName the value to set + * @return this builder + **/ + public Builder okvEndPointGroupName(String okvEndPointGroupName) { + this.okvEndPointGroupName = okvEndPointGroupName; + this.__explicitlySet__.add("okvEndPointGroupName"); + return this; + } + /** + * The protection mode for the shard peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the shard peer. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedAutonomousDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @param fastStartFailOverLagLimitInSeconds the value to set + * @return this builder + **/ + public Builder fastStartFailOverLagLimitInSeconds( + Integer fastStartFailOverLagLimitInSeconds) { + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.__explicitlySet__.add("fastStartFailOverLagLimitInSeconds"); + return this; + } + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + * @param standbyMaintenanceBufferInDays the value to set + * @return this builder + **/ + public Builder standbyMaintenanceBufferInDays(Integer standbyMaintenanceBufferInDays) { + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.__explicitlySet__.add("standbyMaintenanceBufferInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails build() { + CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails model = + new CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails( + this.adminPassword, + this.computeCount, + this.dataStorageSizeInGbs, + this.shardSpaceName, + this.isAutoScalingEnabled, + this.cloudAutonomousVmClusterId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.okvKeyStoreId, + this.okvEndPointGroupName, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.standbyMaintenanceBufferInDays); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy( + CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("shardSpaceName")) { + this.shardSpaceName(model.getShardSpaceName()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabled")) { + this.isAutoScalingEnabled(model.getIsAutoScalingEnabled()); + } + if (model.wasPropertyExplicitlySet("cloudAutonomousVmClusterId")) { + this.cloudAutonomousVmClusterId(model.getCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("okvKeyStoreId")) { + this.okvKeyStoreId(model.getOkvKeyStoreId()); + } + if (model.wasPropertyExplicitlySet("okvEndPointGroupName")) { + this.okvEndPointGroupName(model.getOkvEndPointGroupName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("standbyMaintenanceBufferInDays")) { + this.standbyMaintenanceBufferInDays(model.getStandbyMaintenanceBufferInDays()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails( + String adminPassword, + Float computeCount, + Double dataStorageSizeInGbs, + String shardSpaceName, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.shardSpaceName = shardSpaceName; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails( + char[] adminPassword, + Float computeCount, + Double dataStorageSizeInGbs, + String shardSpaceName, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays) { + super(); + this.adminPassword = adminPassword; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.shardSpaceName = shardSpaceName; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + } + + /** + * Admin password for shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * Admin password for shard database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * Admin password for shard database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The compute count for the shard database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the shard database. It has to be in multiples of 2. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the shard database. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * The shard space name for the shard database. Shard space for an existing shard cannot be changed once the shard is created. + * The shard space name is used when creating new shards. For user-defined sharding, every shard must have a unique + * shard space name. For system-defined sharding, a shard space name is not required. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardSpaceName") + private final String shardSpaceName; + + /** + * The shard space name for the shard database. Shard space for an existing shard cannot be changed once the shard is created. + * The shard space name is used when creating new shards. For user-defined sharding, every shard must have a unique + * shard space name. For system-defined sharding, a shard space name is not required. + * + * @return the value + **/ + public String getShardSpaceName() { + return shardSpaceName; + } + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private final Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @return the value + **/ + public Boolean getIsAutoScalingEnabled() { + return isAutoScalingEnabled; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private final String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * @return the value + **/ + public String getCloudAutonomousVmClusterId() { + return cloudAutonomousVmClusterId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private final String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + * @return the value + **/ + public String getOkvKeyStoreId() { + return okvKeyStoreId; + } + + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private final String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @return the value + **/ + public String getOkvEndPointGroupName() { + return okvEndPointGroupName; + } + + /** + * The protection mode for the shard peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the shard peer. + * @return the value + **/ + public DistributedAutonomousDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private final Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + * @return the value + **/ + public Integer getStandbyMaintenanceBufferInDays() { + return standbyMaintenanceBufferInDays; + } + + @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("CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", shardSpaceName=").append(String.valueOf(this.shardSpaceName)); + sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); + sb.append(", cloudAutonomousVmClusterId=") + .append(String.valueOf(this.cloudAutonomousVmClusterId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", okvKeyStoreId=").append(String.valueOf(this.okvKeyStoreId)); + sb.append(", okvEndPointGroupName=").append(String.valueOf(this.okvEndPointGroupName)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", standbyMaintenanceBufferInDays=") + .append(String.valueOf(this.standbyMaintenanceBufferInDays)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails)) { + return false; + } + + CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails other = + (CreateDistributedAutonomousDatabaseShardWithDedicatedInfraDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.shardSpaceName, other.shardSpaceName) + && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) + && java.util.Objects.equals( + this.cloudAutonomousVmClusterId, other.cloudAutonomousVmClusterId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.okvKeyStoreId, other.okvKeyStoreId) + && java.util.Objects.equals(this.okvEndPointGroupName, other.okvEndPointGroupName) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals( + this.standbyMaintenanceBufferInDays, other.standbyMaintenanceBufferInDays) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.hashCode()); + result = + (result * PRIME) + + (this.shardSpaceName == null ? 43 : this.shardSpaceName.hashCode()); + result = + (result * PRIME) + + (this.isAutoScalingEnabled == null + ? 43 + : this.isAutoScalingEnabled.hashCode()); + result = + (result * PRIME) + + (this.cloudAutonomousVmClusterId == null + ? 43 + : this.cloudAutonomousVmClusterId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.okvKeyStoreId == null ? 43 : this.okvKeyStoreId.hashCode()); + result = + (result * PRIME) + + (this.okvEndPointGroupName == null + ? 43 + : this.okvEndPointGroupName.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = + (result * PRIME) + + (this.standbyMaintenanceBufferInDays == null + ? 43 + : this.standbyMaintenanceBufferInDays.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseDetails.java new file mode 100644 index 0000000000..df11f12f4b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details for creating a distributed database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = CreateDistributedDatabaseCatalogDatabaseDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails.class, + name = "XS_NEW_VAULT_AND_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails.class, + name = "EXISTING_DB_HOME" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails.class, + name = "XS_EXISTING_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails.class, + name = "XD_EXISTING_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails.class, + name = "XS_NEW_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateDistributedDatabaseCatalogDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CreateDistributedDatabaseCatalogDatabaseDetails() { + 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("CreateDistributedDatabaseCatalogDatabaseDetails("); + 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 CreateDistributedDatabaseCatalogDatabaseDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogDatabaseDetails other = + (CreateDistributedDatabaseCatalogDatabaseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed database type. + * Use XS_EXISTING_CLUSTER for a database on Exascale Infrastructure that uses a pre-existing cluster. + * Use XS_NEW_CLUSTER for a database on Exascale Infrastructure that requires a new cluster created from scratch. + * Use XS_NEW_VAULT_AND_CLUSTER for a database on Exascale Infrastructure that requires a new vault and cluster created from scratch. + * Use XD_EXISTING_CLUSTER for a database on Dedicated Infrastructure that uses a pre-existing cluster. + * Use EXISTING_DB_HOME for a database on a pre-existing database home. + * + **/ + public enum Source { + XsExistingCluster("XS_EXISTING_CLUSTER"), + XsNewCluster("XS_NEW_CLUSTER"), + XsNewVaultAndCluster("XS_NEW_VAULT_AND_CLUSTER"), + XdExistingCluster("XD_EXISTING_CLUSTER"), + ExistingDbHome("EXISTING_DB_HOME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + map.put(v.getValue(), v); + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Source: " + key); + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails.java new file mode 100644 index 0000000000..43d4c1cf39 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails.java @@ -0,0 +1,436 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database catalog using a pre-existing Database Home. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails + extends CreateDistributedDatabaseCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails build() { + CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails model = + new CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails( + this.dbHomeId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails model) { + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails( + String dbHomeId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.dbHomeId = dbHomeId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails( + String dbHomeId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.dbHomeId = dbHomeId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails other = + (CreateDistributedDatabaseCatalogDatabaseWithDbHomeDetails) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails.java new file mode 100644 index 0000000000..2c4b348212 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database catalog using an existing ExaDB-D VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails + extends CreateDistributedDatabaseCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails build() { + CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails model = + new CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails( + this.vmClusterId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails model) { + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails( + String vmClusterId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails( + String vmClusterId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails other = + (CreateDistributedDatabaseCatalogDatabaseWithExadbXdDetails) o; + return java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails.java new file mode 100644 index 0000000000..421de8d752 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails.java @@ -0,0 +1,436 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database catalog using an existing ExaDB-XS VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails + extends CreateDistributedDatabaseCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * The admin password for the catalog associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with the distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails build() { + CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails model = + new CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails( + this.vmClusterId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails model) { + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails( + String vmClusterId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails( + String vmClusterId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * The admin password for the catalog associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with the distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with the distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails other = + (CreateDistributedDatabaseCatalogDatabaseWithExadbXsDetails) o; + return java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDetails.java new file mode 100644 index 0000000000..c586ee580c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogDetails.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a Globally distributed database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public CreateDistributedDatabaseCatalogDetails( + CreateDistributedDatabaseCatalogReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateDistributedDatabaseCatalogReplicaDetails originalReplica; + + public Builder originalReplica( + CreateDistributedDatabaseCatalogReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * Details required to create data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the catalog. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogDetails build() { + CreateDistributedDatabaseCatalogDetails model = + new CreateDistributedDatabaseCatalogDetails( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogDetails model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateDistributedDatabaseCatalogReplicaDetails originalReplica; + + public CreateDistributedDatabaseCatalogReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * Details required to create data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * Details required to create data guard replicas for the catalog. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateDistributedDatabaseCatalogDetails("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogDetails other = (CreateDistributedDatabaseCatalogDetails) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogReplicaDetails.java new file mode 100644 index 0000000000..46c7480645 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogReplicaDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create a catalog replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public CreateDistributedDatabaseCatalogReplicaDetails( + String name, CreateDistributedDatabaseCatalogDatabaseDetails database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private CreateDistributedDatabaseCatalogDatabaseDetails database; + + public Builder database(CreateDistributedDatabaseCatalogDatabaseDetails database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogReplicaDetails build() { + CreateDistributedDatabaseCatalogReplicaDetails model = + new CreateDistributedDatabaseCatalogReplicaDetails(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final CreateDistributedDatabaseCatalogDatabaseDetails database; + + public CreateDistributedDatabaseCatalogDatabaseDetails getDatabase() { + return database; + } + + @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("CreateDistributedDatabaseCatalogReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogReplicaDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogReplicaDetails other = + (CreateDistributedDatabaseCatalogReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails.java new file mode 100644 index 0000000000..e5d0a3bc3b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails.java @@ -0,0 +1,516 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database catalog on a new ExaDB-XS VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails + extends CreateDistributedDatabaseCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private VmClusterDetails vmClusterDetails; + + public Builder vmClusterDetails(VmClusterDetails vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails build() { + CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails model = + new CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails( + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.availabilityDomain, + this.exascaleDbStorageVaultId, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails( + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + String exascaleDbStorageVaultId, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails( + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + String exascaleDbStorageVaultId, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final VmClusterDetails vmClusterDetails; + + public VmClusterDetails getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails other = + (CreateDistributedDatabaseCatalogWithExadbXsNewClusterDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails.java new file mode 100644 index 0000000000..3ee990b1db --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails.java @@ -0,0 +1,505 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database catalog on a new ExaDB-XS VM cluster and storage vault. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails + extends CreateDistributedDatabaseCatalogDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private DbStorageVaultDetails dbStorageVaultDetails; + + public Builder dbStorageVaultDetails(DbStorageVaultDetails dbStorageVaultDetails) { + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.__explicitlySet__.add("dbStorageVaultDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private VmClusterDetails vmClusterDetails; + + public Builder vmClusterDetails(VmClusterDetails vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails build() { + CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails model = + new CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails( + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.availabilityDomain, + this.dbStorageVaultDetails, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy( + CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("dbStorageVaultDetails")) { + this.dbStorageVaultDetails(model.getDbStorageVaultDetails()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails( + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + DbStorageVaultDetails dbStorageVaultDetails, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails( + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + DbStorageVaultDetails dbStorageVaultDetails, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the catalog associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the catalog associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private final DbStorageVaultDetails dbStorageVaultDetails; + + public DbStorageVaultDetails getDbStorageVaultDetails() { + return dbStorageVaultDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final VmClusterDetails vmClusterDetails; + + public VmClusterDetails getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", dbStorageVaultDetails=").append(String.valueOf(this.dbStorageVaultDetails)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails)) { + return false; + } + + CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails other = + (CreateDistributedDatabaseCatalogWithExadbXsNewVaultAndClusterDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.dbStorageVaultDetails, other.dbStorageVaultDetails) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.dbStorageVaultDetails == null + ? 43 + : this.dbStorageVaultDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseDetails.java new file mode 100644 index 0000000000..70e1e39141 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseDetails.java @@ -0,0 +1,1270 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required for creation of the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "databaseVersion", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "scanListenerPort", + "systemChunkCount", + "systemRaftReplicationUnitCount", + "compositeRaftShardSpaces", + "compositeDataGuardShardSpaces", + "systemRaftClusters", + "systemDataGuardDatabases", + "userShardSpaces", + "catalogDetails", + "gsmSshPublicKey", + "dbBackupConfig", + "vcnNsgIds", + "freeformTags", + "definedTags" + }) + public CreateDistributedDatabaseDetails( + String compartmentId, + String displayName, + String databaseVersion, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer scanListenerPort, + Integer systemChunkCount, + Integer systemRaftReplicationUnitCount, + java.util.List compositeRaftShardSpaces, + java.util.List compositeDataGuardShardSpaces, + java.util.List systemRaftClusters, + CreateSystemDataGuardDatabaseDetails systemDataGuardDatabases, + java.util.List userShardSpaces, + java.util.List catalogDetails, + String gsmSshPublicKey, + DistributedDbBackupConfig dbBackupConfig, + java.util.List vcnNsgIds, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.databaseVersion = databaseVersion; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.scanListenerPort = scanListenerPort; + this.systemChunkCount = systemChunkCount; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.systemRaftClusters = systemRaftClusters; + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.userShardSpaces = userShardSpaces; + this.catalogDetails = catalogDetails; + this.gsmSshPublicKey = gsmSshPublicKey; + this.dbBackupConfig = dbBackupConfig; + this.vcnNsgIds = vcnNsgIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoints associated with the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoints associated with the Globally distributed database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The listener port number for the Globally distributed database. The listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The listener port number for the Globally distributed database. The listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. + * + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for the Globally distributed database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. For EXADB based distributed databases, + * tls is not supported hence the listenerPortTls is not needed to be provided in create payload. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. For EXADB based distributed databases, + * tls is not supported hence the listenerPortTls is not needed to be provided in create payload. + * + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * The ons local port number for the Globally distributed database. The onsPortLocal has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * The ons local port number for the Globally distributed database. The onsPortLocal has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * The ons remote port number for the Globally distributed database. The onsPortRemote has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * The ons remote port number for the Globally distributed database. The onsPortRemote has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * TCP SCAN listener port for new clusters to be created. + * Applicable only when shard and catalog source types are XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * Defaults to 1521 when not provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPort") + private Integer scanListenerPort; + + /** + * TCP SCAN listener port for new clusters to be created. + * Applicable only when shard and catalog source types are XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * Defaults to 1521 when not provided. + * + * @param scanListenerPort the value to set + * @return this builder + **/ + public Builder scanListenerPort(Integer scanListenerPort) { + this.scanListenerPort = scanListenerPort; + this.__explicitlySet__.add("scanListenerPort"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @param compositeRaftShardSpaces the value to set + * @return this builder + **/ + public Builder compositeRaftShardSpaces( + java.util.List compositeRaftShardSpaces) { + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.__explicitlySet__.add("compositeRaftShardSpaces"); + return this; + } + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @param compositeDataGuardShardSpaces the value to set + * @return this builder + **/ + public Builder compositeDataGuardShardSpaces( + java.util.List + compositeDataGuardShardSpaces) { + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.__explicitlySet__.add("compositeDataGuardShardSpaces"); + return this; + } + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @param systemRaftClusters the value to set + * @return this builder + **/ + public Builder systemRaftClusters( + java.util.List systemRaftClusters) { + this.systemRaftClusters = systemRaftClusters; + this.__explicitlySet__.add("systemRaftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private CreateSystemDataGuardDatabaseDetails systemDataGuardDatabases; + + public Builder systemDataGuardDatabases( + CreateSystemDataGuardDatabaseDetails systemDataGuardDatabases) { + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.__explicitlySet__.add("systemDataGuardDatabases"); + return this; + } + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @param userShardSpaces the value to set + * @return this builder + **/ + public Builder userShardSpaces( + java.util.List userShardSpaces) { + this.userShardSpaces = userShardSpaces; + this.__explicitlySet__.add("userShardSpaces"); + return this; + } + /** + * Collection of catalog details for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private java.util.List catalogDetails; + + /** + * Collection of catalog details for the Globally distributed database. + * @param catalogDetails the value to set + * @return this builder + **/ + public Builder catalogDetails( + java.util.List catalogDetails) { + this.catalogDetails = catalogDetails; + this.__explicitlySet__.add("catalogDetails"); + return this; + } + /** + * The SSH public key for Global service manager instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmSshPublicKey") + private String gsmSshPublicKey; + + /** + * The SSH public key for Global service manager instances. + * @param gsmSshPublicKey the value to set + * @return this builder + **/ + public Builder gsmSshPublicKey(String gsmSshPublicKey) { + this.gsmSshPublicKey = gsmSshPublicKey; + this.__explicitlySet__.add("gsmSshPublicKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + /** + * The list of network security group (NSG) details to be associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the distributed database. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 CreateDistributedDatabaseDetails build() { + CreateDistributedDatabaseDetails model = + new CreateDistributedDatabaseDetails( + this.compartmentId, + this.displayName, + this.databaseVersion, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.scanListenerPort, + this.systemChunkCount, + this.systemRaftReplicationUnitCount, + this.compositeRaftShardSpaces, + this.compositeDataGuardShardSpaces, + this.systemRaftClusters, + this.systemDataGuardDatabases, + this.userShardSpaces, + this.catalogDetails, + this.gsmSshPublicKey, + this.dbBackupConfig, + this.vcnNsgIds, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("scanListenerPort")) { + this.scanListenerPort(model.getScanListenerPort()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("compositeRaftShardSpaces")) { + this.compositeRaftShardSpaces(model.getCompositeRaftShardSpaces()); + } + if (model.wasPropertyExplicitlySet("compositeDataGuardShardSpaces")) { + this.compositeDataGuardShardSpaces(model.getCompositeDataGuardShardSpaces()); + } + if (model.wasPropertyExplicitlySet("systemRaftClusters")) { + this.systemRaftClusters(model.getSystemRaftClusters()); + } + if (model.wasPropertyExplicitlySet("systemDataGuardDatabases")) { + this.systemDataGuardDatabases(model.getSystemDataGuardDatabases()); + } + if (model.wasPropertyExplicitlySet("userShardSpaces")) { + this.userShardSpaces(model.getUserShardSpaces()); + } + if (model.wasPropertyExplicitlySet("catalogDetails")) { + this.catalogDetails(model.getCatalogDetails()); + } + if (model.wasPropertyExplicitlySet("gsmSshPublicKey")) { + this.gsmSshPublicKey(model.getGsmSshPublicKey()); + } + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoints associated with the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoints associated with the Globally distributed database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The listener port number for the Globally distributed database. The listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The listener port number for the Globally distributed database. The listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. + * + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for the Globally distributed database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. For EXADB based distributed databases, + * tls is not supported hence the listenerPortTls is not needed to be provided in create payload. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed database. The TLS listener port number + * has to be unique for a customer tenancy across all distributed databases. Same port number should + * not be re-used for any other distributed database. For EXADB based distributed databases, + * tls is not supported hence the listenerPortTls is not needed to be provided in create payload. + * + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * The ons local port number for the Globally distributed database. The onsPortLocal has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * The ons local port number for the Globally distributed database. The onsPortLocal has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * The ons remote port number for the Globally distributed database. The onsPortRemote has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * The ons remote port number for the Globally distributed database. The onsPortRemote has to be + * unique for a customer tenancy across all distributed databases. Same port number should not be + * re-used for any other distributed database. + * + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * TCP SCAN listener port for new clusters to be created. + * Applicable only when shard and catalog source types are XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * Defaults to 1521 when not provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPort") + private final Integer scanListenerPort; + + /** + * TCP SCAN listener port for new clusters to be created. + * Applicable only when shard and catalog source types are XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * Defaults to 1521 when not provided. + * + * @return the value + **/ + public Integer getScanListenerPort() { + return scanListenerPort; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private final java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @return the value + **/ + public java.util.List getCompositeRaftShardSpaces() { + return compositeRaftShardSpaces; + } + + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private final java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @return the value + **/ + public java.util.List + getCompositeDataGuardShardSpaces() { + return compositeDataGuardShardSpaces; + } + + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private final java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @return the value + **/ + public java.util.List getSystemRaftClusters() { + return systemRaftClusters; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private final CreateSystemDataGuardDatabaseDetails systemDataGuardDatabases; + + public CreateSystemDataGuardDatabaseDetails getSystemDataGuardDatabases() { + return systemDataGuardDatabases; + } + + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private final java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @return the value + **/ + public java.util.List getUserShardSpaces() { + return userShardSpaces; + } + + /** + * Collection of catalog details for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private final java.util.List catalogDetails; + + /** + * Collection of catalog details for the Globally distributed database. + * @return the value + **/ + public java.util.List getCatalogDetails() { + return catalogDetails; + } + + /** + * The SSH public key for Global service manager instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmSshPublicKey") + private final String gsmSshPublicKey; + + /** + * The SSH public key for Global service manager instances. + * @return the value + **/ + public String getGsmSshPublicKey() { + return gsmSshPublicKey; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedDbBackupConfig dbBackupConfig; + + public DistributedDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + /** + * The list of network security group (NSG) details to be associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the distributed database. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("CreateDistributedDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", scanListenerPort=").append(String.valueOf(this.scanListenerPort)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", compositeRaftShardSpaces=") + .append(String.valueOf(this.compositeRaftShardSpaces)); + sb.append(", compositeDataGuardShardSpaces=") + .append(String.valueOf(this.compositeDataGuardShardSpaces)); + sb.append(", systemRaftClusters=").append(String.valueOf(this.systemRaftClusters)); + sb.append(", systemDataGuardDatabases=") + .append(String.valueOf(this.systemDataGuardDatabases)); + sb.append(", userShardSpaces=").append(String.valueOf(this.userShardSpaces)); + sb.append(", catalogDetails=").append(String.valueOf(this.catalogDetails)); + sb.append(", gsmSshPublicKey=").append(String.valueOf(this.gsmSshPublicKey)); + sb.append(", dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + 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 CreateDistributedDatabaseDetails)) { + return false; + } + + CreateDistributedDatabaseDetails other = (CreateDistributedDatabaseDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.scanListenerPort, other.scanListenerPort) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals( + this.compositeRaftShardSpaces, other.compositeRaftShardSpaces) + && java.util.Objects.equals( + this.compositeDataGuardShardSpaces, other.compositeDataGuardShardSpaces) + && java.util.Objects.equals(this.systemRaftClusters, other.systemRaftClusters) + && java.util.Objects.equals( + this.systemDataGuardDatabases, other.systemDataGuardDatabases) + && java.util.Objects.equals(this.userShardSpaces, other.userShardSpaces) + && java.util.Objects.equals(this.catalogDetails, other.catalogDetails) + && java.util.Objects.equals(this.gsmSshPublicKey, other.gsmSshPublicKey) + && java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.databaseVersion == null ? 43 : this.databaseVersion.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPort == null ? 43 : this.scanListenerPort.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = + (result * PRIME) + + (this.compositeRaftShardSpaces == null + ? 43 + : this.compositeRaftShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.compositeDataGuardShardSpaces == null + ? 43 + : this.compositeDataGuardShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.systemRaftClusters == null + ? 43 + : this.systemRaftClusters.hashCode()); + result = + (result * PRIME) + + (this.systemDataGuardDatabases == null + ? 43 + : this.systemDataGuardDatabases.hashCode()); + result = + (result * PRIME) + + (this.userShardSpaces == null ? 43 : this.userShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.catalogDetails == null ? 43 : this.catalogDetails.hashCode()); + result = + (result * PRIME) + + (this.gsmSshPublicKey == null ? 43 : this.gsmSshPublicKey.hashCode()); + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabasePrivateEndpointDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabasePrivateEndpointDetails.java new file mode 100644 index 0000000000..57ef3e9245 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabasePrivateEndpointDetails.java @@ -0,0 +1,401 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required for private endpoint creation. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabasePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabasePrivateEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "subnetId", + "displayName", + "description", + "vcnNsgIds", + "freeformTags", + "definedTags" + }) + public CreateDistributedDatabasePrivateEndpointDetails( + String compartmentId, + String subnetId, + String displayName, + String description, + java.util.List vcnNsgIds, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.subnetId = subnetId; + this.displayName = displayName; + this.description = description; + this.vcnNsgIds = vcnNsgIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Identifier of the compartment where private endpoint is to be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Identifier of the compartment where private endpoint is to be created. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Identifier of the customer subnet against which private endpoint is to be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * Identifier of the customer subnet against which private endpoint is to be created. + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * Private endpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Private endpoint display name. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The list of network security group (NSG) details to be associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the private endpoint. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 CreateDistributedDatabasePrivateEndpointDetails build() { + CreateDistributedDatabasePrivateEndpointDetails model = + new CreateDistributedDatabasePrivateEndpointDetails( + this.compartmentId, + this.subnetId, + this.displayName, + this.description, + this.vcnNsgIds, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabasePrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + 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); + } + + /** + * Identifier of the compartment where private endpoint is to be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Identifier of the compartment where private endpoint is to be created. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Identifier of the customer subnet against which private endpoint is to be created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * Identifier of the customer subnet against which private endpoint is to be created. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * Private endpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Private endpoint display name. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The list of network security group (NSG) details to be associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details to be associated with the private endpoint. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("CreateDistributedDatabasePrivateEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + 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 CreateDistributedDatabasePrivateEndpointDetails)) { + return false; + } + + CreateDistributedDatabasePrivateEndpointDetails other = + (CreateDistributedDatabasePrivateEndpointDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && 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.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseDetails.java new file mode 100644 index 0000000000..1e426cb271 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details for creating a distributed database shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = CreateDistributedDatabaseShardDatabaseDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseShardWithExadbXsNewClusterDetails.class, + name = "XS_NEW_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails.class, + name = "XS_NEW_VAULT_AND_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseShardDatabaseWithExadbXsDetails.class, + name = "XS_EXISTING_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseShardDatabaseWithDbHomeDetails.class, + name = "EXISTING_DB_HOME" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDistributedDatabaseShardDatabaseWithExadbXdDetails.class, + name = "XD_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateDistributedDatabaseShardDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CreateDistributedDatabaseShardDatabaseDetails() { + 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("CreateDistributedDatabaseShardDatabaseDetails("); + 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 CreateDistributedDatabaseShardDatabaseDetails)) { + return false; + } + + CreateDistributedDatabaseShardDatabaseDetails other = + (CreateDistributedDatabaseShardDatabaseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed database type. + * Use XS_EXISTING_CLUSTER for a database on Exascale Infrastructure that uses a pre-existing cluster. + * Use XS_NEW_CLUSTER for a database on Exascale Infrastructure that requires a new cluster created from scratch. + * Use XS_NEW_VAULT_AND_CLUSTER for a database on Exascale Infrastructure that requires a new vault and cluster created from scratch. + * Use XD_EXISTING_CLUSTER for a database on Dedicated Infrastructure that uses a pre-existing cluster. + * Use EXISTING_DB_HOME for a database on a pre-existing database home. + * + **/ + public enum Source { + XsExistingCluster("XS_EXISTING_CLUSTER"), + XsNewCluster("XS_NEW_CLUSTER"), + XsNewVaultAndCluster("XS_NEW_VAULT_AND_CLUSTER"), + XdExistingCluster("XD_EXISTING_CLUSTER"), + ExistingDbHome("EXISTING_DB_HOME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + map.put(v.getValue(), v); + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Source: " + key); + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithDbHomeDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithDbHomeDetails.java new file mode 100644 index 0000000000..3f4f0f8c8d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithDbHomeDetails.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database shard using a pre-existing Database Home. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseShardDatabaseWithDbHomeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseShardDatabaseWithDbHomeDetails + extends CreateDistributedDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseShardDatabaseWithDbHomeDetails build() { + CreateDistributedDatabaseShardDatabaseWithDbHomeDetails model = + new CreateDistributedDatabaseShardDatabaseWithDbHomeDetails( + this.dbHomeId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseShardDatabaseWithDbHomeDetails model) { + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithDbHomeDetails( + String dbHomeId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.dbHomeId = dbHomeId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithDbHomeDetails( + String dbHomeId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.dbHomeId = dbHomeId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseShardDatabaseWithDbHomeDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseShardDatabaseWithDbHomeDetails)) { + return false; + } + + CreateDistributedDatabaseShardDatabaseWithDbHomeDetails other = + (CreateDistributedDatabaseShardDatabaseWithDbHomeDetails) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXdDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXdDetails.java new file mode 100644 index 0000000000..9a4aa7822d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXdDetails.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database shard using an existing ExaDB-D VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseShardDatabaseWithExadbXdDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseShardDatabaseWithExadbXdDetails + extends CreateDistributedDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseShardDatabaseWithExadbXdDetails build() { + CreateDistributedDatabaseShardDatabaseWithExadbXdDetails model = + new CreateDistributedDatabaseShardDatabaseWithExadbXdDetails( + this.vmClusterId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseShardDatabaseWithExadbXdDetails model) { + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithExadbXdDetails( + String vmClusterId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithExadbXdDetails( + String vmClusterId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseShardDatabaseWithExadbXdDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseShardDatabaseWithExadbXdDetails)) { + return false; + } + + CreateDistributedDatabaseShardDatabaseWithExadbXdDetails other = + (CreateDistributedDatabaseShardDatabaseWithExadbXdDetails) o; + return java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXsDetails.java new file mode 100644 index 0000000000..365f75af11 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardDatabaseWithExadbXsDetails.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database shard using an existing ExaDB-XS VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseShardDatabaseWithExadbXsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseShardDatabaseWithExadbXsDetails + extends CreateDistributedDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseShardDatabaseWithExadbXsDetails build() { + CreateDistributedDatabaseShardDatabaseWithExadbXsDetails model = + new CreateDistributedDatabaseShardDatabaseWithExadbXsDetails( + this.vmClusterId, + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseShardDatabaseWithExadbXsDetails model) { + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithExadbXsDetails( + String vmClusterId, + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseShardDatabaseWithExadbXsDetails( + String vmClusterId, + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.vmClusterId = vmClusterId; + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseShardDatabaseWithExadbXsDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseShardDatabaseWithExadbXsDetails)) { + return false; + } + + CreateDistributedDatabaseShardDatabaseWithExadbXsDetails other = + (CreateDistributedDatabaseShardDatabaseWithExadbXsDetails) o; + return java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewClusterDetails.java new file mode 100644 index 0000000000..785d1247b9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewClusterDetails.java @@ -0,0 +1,516 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database shard on a new ExaDB-XS VM cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseShardWithExadbXsNewClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseShardWithExadbXsNewClusterDetails + extends CreateDistributedDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The name of the availability domain that the distributed database shard will be located in like yKoY:US-ASHBURN-AD-3. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in like yKoY:US-ASHBURN-AD-3. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private VmClusterDetails vmClusterDetails; + + public Builder vmClusterDetails(VmClusterDetails vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseShardWithExadbXsNewClusterDetails build() { + CreateDistributedDatabaseShardWithExadbXsNewClusterDetails model = + new CreateDistributedDatabaseShardWithExadbXsNewClusterDetails( + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.availabilityDomain, + this.exascaleDbStorageVaultId, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDistributedDatabaseShardWithExadbXsNewClusterDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseShardWithExadbXsNewClusterDetails( + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + String exascaleDbStorageVaultId, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseShardWithExadbXsNewClusterDetails( + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + String exascaleDbStorageVaultId, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The name of the availability domain that the distributed database shard will be located in like yKoY:US-ASHBURN-AD-3. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in like yKoY:US-ASHBURN-AD-3. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final VmClusterDetails vmClusterDetails; + + public VmClusterDetails getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseShardWithExadbXsNewClusterDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseShardWithExadbXsNewClusterDetails)) { + return false; + } + + CreateDistributedDatabaseShardWithExadbXsNewClusterDetails other = + (CreateDistributedDatabaseShardWithExadbXsNewClusterDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails.java new file mode 100644 index 0000000000..91e90d0c2e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails.java @@ -0,0 +1,505 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Configuration for creating a distributed database shard on a new ExaDB-XS VM cluster and storage vault. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails + extends CreateDistributedDatabaseShardDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private DbStorageVaultDetails dbStorageVaultDetails; + + public Builder dbStorageVaultDetails(DbStorageVaultDetails dbStorageVaultDetails) { + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.__explicitlySet__.add("dbStorageVaultDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private VmClusterDetails vmClusterDetails; + + public Builder vmClusterDetails(VmClusterDetails vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails build() { + CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails model = + new CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails( + this.adminPassword, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.availabilityDomain, + this.dbStorageVaultDetails, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy( + CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails model) { + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("dbStorageVaultDetails")) { + this.dbStorageVaultDetails(model.getDbStorageVaultDetails()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails( + String adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + DbStorageVaultDetails dbStorageVaultDetails, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + public CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails( + char[] adminPassword, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String availabilityDomain, + DbStorageVaultDetails dbStorageVaultDetails, + VmClusterDetails vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(); + this.adminPassword = adminPassword; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The admin password for the shard associated with Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard associated with Globally distributed database. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard associated with Globally distributed database. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private final DbStorageVaultDetails dbStorageVaultDetails; + + public DbStorageVaultDetails getDbStorageVaultDetails() { + return dbStorageVaultDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final VmClusterDetails vmClusterDetails; + + public VmClusterDetails getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", adminPassword=").append(""); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", dbStorageVaultDetails=").append(String.valueOf(this.dbStorageVaultDetails)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails)) { + return false; + } + + CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails other = + (CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails) o; + return java.util.Objects.equals(this.adminPassword, other.adminPassword) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.dbStorageVaultDetails, other.dbStorageVaultDetails) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.dbStorageVaultDetails == null + ? 43 + : this.dbStorageVaultDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardDatabaseDetails.java new file mode 100644 index 0000000000..bdde8b4b10 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardDatabaseDetails.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create system data guard shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSystemDataGuardDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSystemDataGuardDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public CreateSystemDataGuardDatabaseDetails( + CreateSystemDataGuardReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateSystemDataGuardReplicaDetails originalReplica; + + public Builder originalReplica(CreateSystemDataGuardReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details required to create system data guard replicas. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details required to create system data guard replicas. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSystemDataGuardDatabaseDetails build() { + CreateSystemDataGuardDatabaseDetails model = + new CreateSystemDataGuardDatabaseDetails( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSystemDataGuardDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateSystemDataGuardReplicaDetails originalReplica; + + public CreateSystemDataGuardReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details required to create system data guard replicas. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details required to create system data guard replicas. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateSystemDataGuardDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSystemDataGuardDatabaseDetails)) { + return false; + } + + CreateSystemDataGuardDatabaseDetails other = (CreateSystemDataGuardDatabaseDetails) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardReplicaDetails.java new file mode 100644 index 0000000000..ce4ba0a5d6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemDataGuardReplicaDetails.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create system data guard replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSystemDataGuardReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSystemDataGuardReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public CreateSystemDataGuardReplicaDetails( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSystemDataGuardReplicaDetails build() { + CreateSystemDataGuardReplicaDetails model = + new CreateSystemDataGuardReplicaDetails(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSystemDataGuardReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateSystemDataGuardReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSystemDataGuardReplicaDetails)) { + return false; + } + + CreateSystemDataGuardReplicaDetails other = (CreateSystemDataGuardReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemRaftClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemRaftClusterDetails.java new file mode 100644 index 0000000000..0c874ea665 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateSystemRaftClusterDetails.java @@ -0,0 +1,351 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create system raft cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSystemRaftClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSystemRaftClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public CreateSystemRaftClusterDetails( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases( + java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSystemRaftClusterDetails build() { + CreateSystemRaftClusterDetails model = + new CreateSystemRaftClusterDetails( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSystemRaftClusterDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + map.put(v.getValue(), v); + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RuMode: " + key); + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("CreateSystemRaftClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSystemRaftClusterDetails)) { + return false; + } + + CreateSystemRaftClusterDetails other = (CreateSystemRaftClusterDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceDetails.java new file mode 100644 index 0000000000..d2b0c1da17 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceDetails.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create user shard space. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateUserShardSpaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateUserShardSpaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "originalReplica", "dataGuardReplicas"}) + public CreateUserShardSpaceDetails( + String name, + CreateUserShardSpaceReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private CreateUserShardSpaceReplicaDetails originalReplica; + + public Builder originalReplica(CreateUserShardSpaceReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica for the user shard space being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replica for the user shard space being created. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateUserShardSpaceDetails build() { + CreateUserShardSpaceDetails model = + new CreateUserShardSpaceDetails( + this.name, this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateUserShardSpaceDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final CreateUserShardSpaceReplicaDetails originalReplica; + + public CreateUserShardSpaceReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica for the user shard space being created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replica for the user shard space being created. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("CreateUserShardSpaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateUserShardSpaceDetails)) { + return false; + } + + CreateUserShardSpaceDetails other = (CreateUserShardSpaceDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceReplicaDetails.java new file mode 100644 index 0000000000..0f7764bbee --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/CreateUserShardSpaceReplicaDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details required to create user shard space replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateUserShardSpaceReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateUserShardSpaceReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public CreateUserShardSpaceReplicaDetails( + String name, CreateDistributedDatabaseShardDatabaseDetails database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private CreateDistributedDatabaseShardDatabaseDetails database; + + public Builder database(CreateDistributedDatabaseShardDatabaseDetails database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateUserShardSpaceReplicaDetails build() { + CreateUserShardSpaceReplicaDetails model = + new CreateUserShardSpaceReplicaDetails(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateUserShardSpaceReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final CreateDistributedDatabaseShardDatabaseDetails database; + + public CreateDistributedDatabaseShardDatabaseDetails getDatabase() { + return database; + } + + @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("CreateUserShardSpaceReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateUserShardSpaceReplicaDetails)) { + return false; + } + + CreateUserShardSpaceReplicaDetails other = (CreateUserShardSpaceReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DbStorageVaultDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DbStorageVaultDetails.java new file mode 100644 index 0000000000..a35943b31a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DbStorageVaultDetails.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the request to create exascale db vault storage for shard or catalog of the distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DbStorageVaultDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DbStorageVaultDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent", + "subscriptionId", + "isAutoscaleEnabled", + "autoscaleLimitInGBs" + }) + public DbStorageVaultDetails( + String compartmentId, + Integer highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent, + String subscriptionId, + Boolean isAutoscaleEnabled, + Integer autoscaleLimitInGBs) { + super(); + this.compartmentId = compartmentId; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.subscriptionId = subscriptionId; + this.isAutoscaleEnabled = isAutoscaleEnabled; + this.autoscaleLimitInGBs = autoscaleLimitInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Total storage capacity in GB for vault storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private Integer highCapacityDatabaseStorage; + + /** + * Total storage capacity in GB for vault storage. + * @param highCapacityDatabaseStorage the value to set + * @return this builder + **/ + public Builder highCapacityDatabaseStorage(Integer highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoscaleEnabled") + private Boolean isAutoscaleEnabled; + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + * @param isAutoscaleEnabled the value to set + * @return this builder + **/ + public Builder isAutoscaleEnabled(Boolean isAutoscaleEnabled) { + this.isAutoscaleEnabled = isAutoscaleEnabled; + this.__explicitlySet__.add("isAutoscaleEnabled"); + return this; + } + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoscaleLimitInGBs") + private Integer autoscaleLimitInGBs; + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + * @param autoscaleLimitInGBs the value to set + * @return this builder + **/ + public Builder autoscaleLimitInGBs(Integer autoscaleLimitInGBs) { + this.autoscaleLimitInGBs = autoscaleLimitInGBs; + this.__explicitlySet__.add("autoscaleLimitInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DbStorageVaultDetails build() { + DbStorageVaultDetails model = + new DbStorageVaultDetails( + this.compartmentId, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent, + this.subscriptionId, + this.isAutoscaleEnabled, + this.autoscaleLimitInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DbStorageVaultDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isAutoscaleEnabled")) { + this.isAutoscaleEnabled(model.getIsAutoscaleEnabled()); + } + if (model.wasPropertyExplicitlySet("autoscaleLimitInGBs")) { + this.autoscaleLimitInGBs(model.getAutoscaleLimitInGBs()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Total storage capacity in GB for vault storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final Integer highCapacityDatabaseStorage; + + /** + * Total storage capacity in GB for vault storage. + * @return the value + **/ + public Integer getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoscaleEnabled") + private final Boolean isAutoscaleEnabled; + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsAutoscaleEnabled() { + return isAutoscaleEnabled; + } + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoscaleLimitInGBs") + private final Integer autoscaleLimitInGBs; + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + * @return the value + **/ + public Integer getAutoscaleLimitInGBs() { + return autoscaleLimitInGBs; + } + + @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("DbStorageVaultDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isAutoscaleEnabled=").append(String.valueOf(this.isAutoscaleEnabled)); + sb.append(", autoscaleLimitInGBs=").append(String.valueOf(this.autoscaleLimitInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DbStorageVaultDetails)) { + return false; + } + + DbStorageVaultDetails other = (DbStorageVaultDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isAutoscaleEnabled, other.isAutoscaleEnabled) + && java.util.Objects.equals(this.autoscaleLimitInGBs, other.autoscaleLimitInGBs) + && 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.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = + (result * PRIME) + + (this.isAutoscaleEnabled == null + ? 43 + : this.isAutoscaleEnabled.hashCode()); + result = + (result * PRIME) + + (this.autoscaleLimitInGBs == null + ? 43 + : this.autoscaleLimitInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabase.java new file mode 100644 index 0000000000..889b5350b3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabase.java @@ -0,0 +1,2013 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "databaseVersion", + "lifecycleState", + "shardingMethod", + "replicationMethod", + "dbDeploymentType", + "lifecycleDetails", + "connectionStrings", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "dbWorkloadType", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "systemChunkCount", + "systemRaftReplicationUnitCount", + "latestGsmImage", + "compositeRaftShardSpaces", + "compositeDataGuardShardSpaces", + "systemRaftClusters", + "systemDataGuardDatabases", + "userShardSpaces", + "catalogDetails", + "gsmDetails", + "gdsControlNodeDetails", + "dbBackupConfig", + "autoResourceManagementConfig", + "vcnNsgIds", + "metadata", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedAutonomousDatabase( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String databaseVersion, + LifecycleState lifecycleState, + ShardingMethod shardingMethod, + ReplicationMethod replicationMethod, + DbDeploymentType dbDeploymentType, + String lifecycleDetails, + DistributedAutonomousDatabaseConnectionString connectionStrings, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + DbWorkloadType dbWorkloadType, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer systemChunkCount, + Integer systemRaftReplicationUnitCount, + DistributedAutonomousDatabaseGsmImage latestGsmImage, + java.util.List compositeRaftShardSpaces, + java.util.List compositeDataGuardShardSpaces, + java.util.List systemRaftClusters, + AutonomousSystemDataGuardDatabase systemDataGuardDatabases, + java.util.List userShardSpaces, + java.util.List catalogDetails, + java.util.List gsmDetails, + java.util.List gdsControlNodeDetails, + DistributedAutonomousDbBackupConfig dbBackupConfig, + AutoResourceManagementConfigurationDetails autoResourceManagementConfig, + java.util.List vcnNsgIds, + DistributedAutonomousDbMetadata metadata, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.databaseVersion = databaseVersion; + this.lifecycleState = lifecycleState; + this.shardingMethod = shardingMethod; + this.replicationMethod = replicationMethod; + this.dbDeploymentType = dbDeploymentType; + this.lifecycleDetails = lifecycleDetails; + this.connectionStrings = connectionStrings; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.dbWorkloadType = dbWorkloadType; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.systemChunkCount = systemChunkCount; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.latestGsmImage = latestGsmImage; + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.systemRaftClusters = systemRaftClusters; + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.userShardSpaces = userShardSpaces; + this.catalogDetails = catalogDetails; + this.gsmDetails = gsmDetails; + this.gdsControlNodeDetails = gdsControlNodeDetails; + this.dbBackupConfig = dbBackupConfig; + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.vcnNsgIds = vcnNsgIds; + this.metadata = metadata; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + * @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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string. + * @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 time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string. + * @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; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Lifecycle states for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * Lifecycle states for the Globally distributed autonomous database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed autonomous database. + * @param shardingMethod the value to set + * @return this builder + **/ + public Builder shardingMethod(ShardingMethod shardingMethod) { + this.shardingMethod = shardingMethod; + this.__explicitlySet__.add("shardingMethod"); + return this; + } + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @param replicationMethod the value to set + * @return this builder + **/ + public Builder replicationMethod(ReplicationMethod replicationMethod) { + this.replicationMethod = replicationMethod; + this.__explicitlySet__.add("replicationMethod"); + return this; + } + /** + * The distributed autonomous database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private DbDeploymentType dbDeploymentType; + + /** + * The distributed autonomous database deployment type. + * + * @param dbDeploymentType the value to set + * @return this builder + **/ + public Builder dbDeploymentType(DbDeploymentType dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + this.__explicitlySet__.add("dbDeploymentType"); + return this; + } + /** + * The lifecycleDetails for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + private DistributedAutonomousDatabaseConnectionString connectionStrings; + + public Builder connectionStrings( + DistributedAutonomousDatabaseConnectionString connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private DbWorkloadType dbWorkloadType; + + /** + * Possible workload types. Currently only OLTP workload type is supported. + * @param dbWorkloadType the value to set + * @return this builder + **/ + public Builder dbWorkloadType(DbWorkloadType dbWorkloadType) { + this.dbWorkloadType = dbWorkloadType; + this.__explicitlySet__.add("dbWorkloadType"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed autonomous database. + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * Ons local port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * Ons local port number for Globally distributed autonomous database. + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * Ons remote port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * Ons remote port number for Globally distributed autonomous database. + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("latestGsmImage") + private DistributedAutonomousDatabaseGsmImage latestGsmImage; + + public Builder latestGsmImage(DistributedAutonomousDatabaseGsmImage latestGsmImage) { + this.latestGsmImage = latestGsmImage; + this.__explicitlySet__.add("latestGsmImage"); + return this; + } + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @param compositeRaftShardSpaces the value to set + * @return this builder + **/ + public Builder compositeRaftShardSpaces( + java.util.List compositeRaftShardSpaces) { + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.__explicitlySet__.add("compositeRaftShardSpaces"); + return this; + } + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @param compositeDataGuardShardSpaces the value to set + * @return this builder + **/ + public Builder compositeDataGuardShardSpaces( + java.util.List + compositeDataGuardShardSpaces) { + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.__explicitlySet__.add("compositeDataGuardShardSpaces"); + return this; + } + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @param systemRaftClusters the value to set + * @return this builder + **/ + public Builder systemRaftClusters( + java.util.List systemRaftClusters) { + this.systemRaftClusters = systemRaftClusters; + this.__explicitlySet__.add("systemRaftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private AutonomousSystemDataGuardDatabase systemDataGuardDatabases; + + public Builder systemDataGuardDatabases( + AutonomousSystemDataGuardDatabase systemDataGuardDatabases) { + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.__explicitlySet__.add("systemDataGuardDatabases"); + return this; + } + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @param userShardSpaces the value to set + * @return this builder + **/ + public Builder userShardSpaces(java.util.List userShardSpaces) { + this.userShardSpaces = userShardSpaces; + this.__explicitlySet__.add("userShardSpaces"); + return this; + } + /** + * Catalog details associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private java.util.List catalogDetails; + + /** + * Catalog details associated with the distributed autonomous database. + * @param catalogDetails the value to set + * @return this builder + **/ + public Builder catalogDetails( + java.util.List catalogDetails) { + this.catalogDetails = catalogDetails; + this.__explicitlySet__.add("catalogDetails"); + return this; + } + /** + * Global Service Manager (GSM) instances associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmDetails") + private java.util.List gsmDetails; + + /** + * Global Service Manager (GSM) instances associated with the distributed autonomous database. + * @param gsmDetails the value to set + * @return this builder + **/ + public Builder gsmDetails(java.util.List gsmDetails) { + this.gsmDetails = gsmDetails; + this.__explicitlySet__.add("gsmDetails"); + return this; + } + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeDetails") + private java.util.List gdsControlNodeDetails; + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed autonomous database. + * @param gdsControlNodeDetails the value to set + * @return this builder + **/ + public Builder gdsControlNodeDetails( + java.util.List gdsControlNodeDetails) { + this.gdsControlNodeDetails = gdsControlNodeDetails; + this.__explicitlySet__.add("gdsControlNodeDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedAutonomousDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedAutonomousDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public Builder autoResourceManagementConfig( + AutoResourceManagementConfigurationDetails autoResourceManagementConfig) { + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.__explicitlySet__.add("autoResourceManagementConfig"); + return this; + } + /** + * The list of network security group (NSG) details associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the distributed autonomous database. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedAutonomousDatabase build() { + DistributedAutonomousDatabase model = + new DistributedAutonomousDatabase( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.databaseVersion, + this.lifecycleState, + this.shardingMethod, + this.replicationMethod, + this.dbDeploymentType, + this.lifecycleDetails, + this.connectionStrings, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.dbWorkloadType, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.systemChunkCount, + this.systemRaftReplicationUnitCount, + this.latestGsmImage, + this.compositeRaftShardSpaces, + this.compositeDataGuardShardSpaces, + this.systemRaftClusters, + this.systemDataGuardDatabases, + this.userShardSpaces, + this.catalogDetails, + this.gsmDetails, + this.gdsControlNodeDetails, + this.dbBackupConfig, + this.autoResourceManagementConfig, + this.vcnNsgIds, + this.metadata, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabase model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("shardingMethod")) { + this.shardingMethod(model.getShardingMethod()); + } + if (model.wasPropertyExplicitlySet("replicationMethod")) { + this.replicationMethod(model.getReplicationMethod()); + } + if (model.wasPropertyExplicitlySet("dbDeploymentType")) { + this.dbDeploymentType(model.getDbDeploymentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("connectionStrings")) { + this.connectionStrings(model.getConnectionStrings()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("dbWorkloadType")) { + this.dbWorkloadType(model.getDbWorkloadType()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("latestGsmImage")) { + this.latestGsmImage(model.getLatestGsmImage()); + } + if (model.wasPropertyExplicitlySet("compositeRaftShardSpaces")) { + this.compositeRaftShardSpaces(model.getCompositeRaftShardSpaces()); + } + if (model.wasPropertyExplicitlySet("compositeDataGuardShardSpaces")) { + this.compositeDataGuardShardSpaces(model.getCompositeDataGuardShardSpaces()); + } + if (model.wasPropertyExplicitlySet("systemRaftClusters")) { + this.systemRaftClusters(model.getSystemRaftClusters()); + } + if (model.wasPropertyExplicitlySet("systemDataGuardDatabases")) { + this.systemDataGuardDatabases(model.getSystemDataGuardDatabases()); + } + if (model.wasPropertyExplicitlySet("userShardSpaces")) { + this.userShardSpaces(model.getUserShardSpaces()); + } + if (model.wasPropertyExplicitlySet("catalogDetails")) { + this.catalogDetails(model.getCatalogDetails()); + } + if (model.wasPropertyExplicitlySet("gsmDetails")) { + this.gsmDetails(model.getGsmDetails()); + } + if (model.wasPropertyExplicitlySet("gdsControlNodeDetails")) { + this.gdsControlNodeDetails(model.getGdsControlNodeDetails()); + } + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + if (model.wasPropertyExplicitlySet("autoResourceManagementConfig")) { + this.autoResourceManagementConfig(model.getAutoResourceManagementConfig()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Lifecycle states for the Globally distributed autonomous database. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + + /** + * 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; + } + }; + /** + * Lifecycle states for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * Lifecycle states for the Globally distributed autonomous database. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + public enum ShardingMethod { + User("USER"), + System("SYSTEM"), + Composite("COMPOSITE"), + + /** + * 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(ShardingMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShardingMethod v : ShardingMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ShardingMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShardingMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ShardingMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private final ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed autonomous database. + * @return the value + **/ + public ShardingMethod getShardingMethod() { + return shardingMethod; + } + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + public enum ReplicationMethod { + Raft("RAFT"), + Dg("DG"), + + /** + * 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(ReplicationMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ReplicationMethod v : ReplicationMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ReplicationMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ReplicationMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ReplicationMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private final ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @return the value + **/ + public ReplicationMethod getReplicationMethod() { + return replicationMethod; + } + + /** + * The distributed autonomous database deployment type. + * + **/ + public enum DbDeploymentType { + AdbD("ADB_D"), + + /** + * 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(DbDeploymentType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbDeploymentType v : DbDeploymentType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DbDeploymentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbDeploymentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DbDeploymentType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The distributed autonomous database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private final DbDeploymentType dbDeploymentType; + + /** + * The distributed autonomous database deployment type. + * + * @return the value + **/ + public DbDeploymentType getDbDeploymentType() { + return dbDeploymentType; + } + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + private final DistributedAutonomousDatabaseConnectionString connectionStrings; + + public DistributedAutonomousDatabaseConnectionString getConnectionStrings() { + return connectionStrings; + } + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + public enum DbWorkloadType { + Oltp("OLTP"), + Dw("DW"), + + /** + * 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(DbWorkloadType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbWorkloadType v : DbWorkloadType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DbWorkloadType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbWorkloadType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DbWorkloadType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Possible workload types. Currently only OLTP workload type is supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private final DbWorkloadType dbWorkloadType; + + /** + * Possible workload types. Currently only OLTP workload type is supported. + * @return the value + **/ + public DbWorkloadType getDbWorkloadType() { + return dbWorkloadType; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed autonomous database. + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * Ons local port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * Ons local port number for Globally distributed autonomous database. + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * Ons remote port number for Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * Ons remote port number for Globally distributed autonomous database. + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("latestGsmImage") + private final DistributedAutonomousDatabaseGsmImage latestGsmImage; + + public DistributedAutonomousDatabaseGsmImage getLatestGsmImage() { + return latestGsmImage; + } + + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private final java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @return the value + **/ + public java.util.List getCompositeRaftShardSpaces() { + return compositeRaftShardSpaces; + } + + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private final java.util.List + compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @return the value + **/ + public java.util.List + getCompositeDataGuardShardSpaces() { + return compositeDataGuardShardSpaces; + } + + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private final java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @return the value + **/ + public java.util.List getSystemRaftClusters() { + return systemRaftClusters; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private final AutonomousSystemDataGuardDatabase systemDataGuardDatabases; + + public AutonomousSystemDataGuardDatabase getSystemDataGuardDatabases() { + return systemDataGuardDatabases; + } + + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private final java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @return the value + **/ + public java.util.List getUserShardSpaces() { + return userShardSpaces; + } + + /** + * Catalog details associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private final java.util.List catalogDetails; + + /** + * Catalog details associated with the distributed autonomous database. + * @return the value + **/ + public java.util.List getCatalogDetails() { + return catalogDetails; + } + + /** + * Global Service Manager (GSM) instances associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmDetails") + private final java.util.List gsmDetails; + + /** + * Global Service Manager (GSM) instances associated with the distributed autonomous database. + * @return the value + **/ + public java.util.List getGsmDetails() { + return gsmDetails; + } + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeDetails") + private final java.util.List gdsControlNodeDetails; + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed autonomous database. + * @return the value + **/ + public java.util.List getGdsControlNodeDetails() { + return gdsControlNodeDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedAutonomousDbBackupConfig dbBackupConfig; + + public DistributedAutonomousDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private final AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public AutoResourceManagementConfigurationDetails getAutoResourceManagementConfig() { + return autoResourceManagementConfig; + } + + /** + * The list of network security group (NSG) details associated with the distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the distributed autonomous database. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata getMetadata() { + return metadata; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedAutonomousDatabase("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", shardingMethod=").append(String.valueOf(this.shardingMethod)); + sb.append(", replicationMethod=").append(String.valueOf(this.replicationMethod)); + sb.append(", dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", connectionStrings=").append(String.valueOf(this.connectionStrings)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", dbWorkloadType=").append(String.valueOf(this.dbWorkloadType)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", latestGsmImage=").append(String.valueOf(this.latestGsmImage)); + sb.append(", compositeRaftShardSpaces=") + .append(String.valueOf(this.compositeRaftShardSpaces)); + sb.append(", compositeDataGuardShardSpaces=") + .append(String.valueOf(this.compositeDataGuardShardSpaces)); + sb.append(", systemRaftClusters=").append(String.valueOf(this.systemRaftClusters)); + sb.append(", systemDataGuardDatabases=") + .append(String.valueOf(this.systemDataGuardDatabases)); + sb.append(", userShardSpaces=").append(String.valueOf(this.userShardSpaces)); + sb.append(", catalogDetails=").append(String.valueOf(this.catalogDetails)); + sb.append(", gsmDetails=").append(String.valueOf(this.gsmDetails)); + sb.append(", gdsControlNodeDetails=").append(String.valueOf(this.gdsControlNodeDetails)); + sb.append(", dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(", autoResourceManagementConfig=") + .append(String.valueOf(this.autoResourceManagementConfig)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + 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 DistributedAutonomousDatabase)) { + return false; + } + + DistributedAutonomousDatabase other = (DistributedAutonomousDatabase) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.shardingMethod, other.shardingMethod) + && java.util.Objects.equals(this.replicationMethod, other.replicationMethod) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.connectionStrings, other.connectionStrings) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.dbWorkloadType, other.dbWorkloadType) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals(this.latestGsmImage, other.latestGsmImage) + && java.util.Objects.equals( + this.compositeRaftShardSpaces, other.compositeRaftShardSpaces) + && java.util.Objects.equals( + this.compositeDataGuardShardSpaces, other.compositeDataGuardShardSpaces) + && java.util.Objects.equals(this.systemRaftClusters, other.systemRaftClusters) + && java.util.Objects.equals( + this.systemDataGuardDatabases, other.systemDataGuardDatabases) + && java.util.Objects.equals(this.userShardSpaces, other.userShardSpaces) + && java.util.Objects.equals(this.catalogDetails, other.catalogDetails) + && java.util.Objects.equals(this.gsmDetails, other.gsmDetails) + && java.util.Objects.equals(this.gdsControlNodeDetails, other.gdsControlNodeDetails) + && java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && java.util.Objects.equals( + this.autoResourceManagementConfig, other.autoResourceManagementConfig) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && java.util.Objects.equals(this.metadata, other.metadata) + && 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.displayName == null ? 43 : this.displayName.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.databaseVersion == null ? 43 : this.databaseVersion.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.shardingMethod == null ? 43 : this.shardingMethod.hashCode()); + result = + (result * PRIME) + + (this.replicationMethod == null ? 43 : this.replicationMethod.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionStrings == null ? 43 : this.connectionStrings.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = + (result * PRIME) + + (this.dbWorkloadType == null ? 43 : this.dbWorkloadType.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = + (result * PRIME) + + (this.latestGsmImage == null ? 43 : this.latestGsmImage.hashCode()); + result = + (result * PRIME) + + (this.compositeRaftShardSpaces == null + ? 43 + : this.compositeRaftShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.compositeDataGuardShardSpaces == null + ? 43 + : this.compositeDataGuardShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.systemRaftClusters == null + ? 43 + : this.systemRaftClusters.hashCode()); + result = + (result * PRIME) + + (this.systemDataGuardDatabases == null + ? 43 + : this.systemDataGuardDatabases.hashCode()); + result = + (result * PRIME) + + (this.userShardSpaces == null ? 43 : this.userShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.catalogDetails == null ? 43 : this.catalogDetails.hashCode()); + result = (result * PRIME) + (this.gsmDetails == null ? 43 : this.gsmDetails.hashCode()); + result = + (result * PRIME) + + (this.gdsControlNodeDetails == null + ? 43 + : this.gdsControlNodeDetails.hashCode()); + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = + (result * PRIME) + + (this.autoResourceManagementConfig == null + ? 43 + : this.autoResourceManagementConfig.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseAutoResourceManagementDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseAutoResourceManagementDetails.java new file mode 100644 index 0000000000..3689bb4c92 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseAutoResourceManagementDetails.java @@ -0,0 +1,577 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Automatic resource management configuration details for the Globally distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseAutoResourceManagementDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseAutoResourceManagementDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEnabled", + "coolOffPeriodInMinutes", + "maxMoveRuAttempts", + "maxMoveRuUnit", + "mode", + "actionType", + "notificationTopicIds", + "streamIds" + }) + public DistributedAutonomousDatabaseAutoResourceManagementDetails( + Boolean isEnabled, + Integer coolOffPeriodInMinutes, + Integer maxMoveRuAttempts, + MaxMoveRuUnit maxMoveRuUnit, + Mode mode, + ActionType actionType, + java.util.List notificationTopicIds, + java.util.List streamIds) { + super(); + this.isEnabled = isEnabled; + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.maxMoveRuUnit = maxMoveRuUnit; + this.mode = mode; + this.actionType = actionType; + this.notificationTopicIds = notificationTopicIds; + this.streamIds = streamIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @param coolOffPeriodInMinutes the value to set + * @return this builder + **/ + public Builder coolOffPeriodInMinutes(Integer coolOffPeriodInMinutes) { + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.__explicitlySet__.add("coolOffPeriodInMinutes"); + return this; + } + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @param maxMoveRuAttempts the value to set + * @return this builder + **/ + public Builder maxMoveRuAttempts(Integer maxMoveRuAttempts) { + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.__explicitlySet__.add("maxMoveRuAttempts"); + return this; + } + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @param maxMoveRuUnit the value to set + * @return this builder + **/ + public Builder maxMoveRuUnit(MaxMoveRuUnit maxMoveRuUnit) { + this.maxMoveRuUnit = maxMoveRuUnit; + this.__explicitlySet__.add("maxMoveRuUnit"); + return this; + } + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @param mode the value to set + * @return this builder + **/ + public Builder mode(Mode mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @param streamIds the value to set + * @return this builder + **/ + public Builder streamIds(java.util.List streamIds) { + this.streamIds = streamIds; + this.__explicitlySet__.add("streamIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseAutoResourceManagementDetails build() { + DistributedAutonomousDatabaseAutoResourceManagementDetails model = + new DistributedAutonomousDatabaseAutoResourceManagementDetails( + this.isEnabled, + this.coolOffPeriodInMinutes, + this.maxMoveRuAttempts, + this.maxMoveRuUnit, + this.mode, + this.actionType, + this.notificationTopicIds, + this.streamIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseAutoResourceManagementDetails model) { + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + if (model.wasPropertyExplicitlySet("coolOffPeriodInMinutes")) { + this.coolOffPeriodInMinutes(model.getCoolOffPeriodInMinutes()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuAttempts")) { + this.maxMoveRuAttempts(model.getMaxMoveRuAttempts()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuUnit")) { + this.maxMoveRuUnit(model.getMaxMoveRuUnit()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("streamIds")) { + this.streamIds(model.getStreamIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private final Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @return the value + **/ + public Integer getCoolOffPeriodInMinutes() { + return coolOffPeriodInMinutes; + } + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private final Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @return the value + **/ + public Integer getMaxMoveRuAttempts() { + return maxMoveRuAttempts; + } + + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + public enum MaxMoveRuUnit { + Hour("HOUR"), + Day("DAY"), + + /** + * 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(MaxMoveRuUnit.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaxMoveRuUnit v : MaxMoveRuUnit.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaxMoveRuUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaxMoveRuUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaxMoveRuUnit', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private final MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @return the value + **/ + public MaxMoveRuUnit getMaxMoveRuUnit() { + return maxMoveRuUnit; + } + + /** + * Mode of autoResourceManagement execution. + **/ + public enum Mode { + Automatic("AUTOMATIC"), + Recommendation("RECOMMENDATION"), + + /** + * 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(Mode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Mode v : Mode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Mode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Mode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Mode', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @return the value + **/ + public Mode getMode() { + return mode; + } + + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + public enum ActionType { + Move("MOVE"), + + /** + * 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 action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private final java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @return the value + **/ + public java.util.List getStreamIds() { + return streamIds; + } + + @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("DistributedAutonomousDatabaseAutoResourceManagementDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", coolOffPeriodInMinutes=").append(String.valueOf(this.coolOffPeriodInMinutes)); + sb.append(", maxMoveRuAttempts=").append(String.valueOf(this.maxMoveRuAttempts)); + sb.append(", maxMoveRuUnit=").append(String.valueOf(this.maxMoveRuUnit)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", streamIds=").append(String.valueOf(this.streamIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseAutoResourceManagementDetails)) { + return false; + } + + DistributedAutonomousDatabaseAutoResourceManagementDetails other = + (DistributedAutonomousDatabaseAutoResourceManagementDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals( + this.coolOffPeriodInMinutes, other.coolOffPeriodInMinutes) + && java.util.Objects.equals(this.maxMoveRuAttempts, other.maxMoveRuAttempts) + && java.util.Objects.equals(this.maxMoveRuUnit, other.maxMoveRuUnit) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.streamIds, other.streamIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = + (result * PRIME) + + (this.coolOffPeriodInMinutes == null + ? 43 + : this.coolOffPeriodInMinutes.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuAttempts == null ? 43 : this.maxMoveRuAttempts.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuUnit == null ? 43 : this.maxMoveRuUnit.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.streamIds == null ? 43 : this.streamIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalog.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalog.java new file mode 100644 index 0000000000..427909bbc1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalog.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed autonomous database catalog details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseCatalog.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseCatalog + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public DistributedAutonomousDatabaseCatalog( + DistributedAutonomousDatabaseCatalogReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private DistributedAutonomousDatabaseCatalogReplica originalReplica; + + public Builder originalReplica( + DistributedAutonomousDatabaseCatalogReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replicas for the catalog. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseCatalog build() { + DistributedAutonomousDatabaseCatalog model = + new DistributedAutonomousDatabaseCatalog( + this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseCatalog model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final DistributedAutonomousDatabaseCatalogReplica originalReplica; + + public DistributedAutonomousDatabaseCatalogReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replicas for the catalog. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("DistributedAutonomousDatabaseCatalog("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseCatalog)) { + return false; + } + + DistributedAutonomousDatabaseCatalog other = (DistributedAutonomousDatabaseCatalog) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogDatabase.java new file mode 100644 index 0000000000..5c810ad718 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogDatabase.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the catalog database associated with the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = DistributedAutonomousDatabaseCatalogDatabase.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedAutonomousDatabaseCatalogWithDedicatedInfra.class, + name = "ADBD_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DistributedAutonomousDatabaseCatalogDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "timeCreated", "timeUpdated", "metadata"}) + protected DistributedAutonomousDatabaseCatalogDatabase( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedAutonomousDbMetadata metadata) { + super(); + this.name = name; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.metadata = metadata; + } + + /** + * The name of the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The time the catalog was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the catalog was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the catalog was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the catalog was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata 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("DistributedAutonomousDatabaseCatalogDatabase("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + 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 DistributedAutonomousDatabaseCatalogDatabase)) { + return false; + } + + DistributedAutonomousDatabaseCatalogDatabase other = + (DistributedAutonomousDatabaseCatalogDatabase) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && 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.name == null ? 43 : this.name.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.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed autonomous database type. + * Use ADBD_EXISTING_CLUSTER for an autonomous database on Dedicated Infrastructure that uses a pre-existing cluster. + * + **/ + public enum Source { + AdbdExistingCluster("ADBD_EXISTING_CLUSTER"), + + /** + * 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(Source.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Source', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogReplica.java new file mode 100644 index 0000000000..25033f17d6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogReplica.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a catalog replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseCatalogReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseCatalogReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public DistributedAutonomousDatabaseCatalogReplica( + String name, DistributedAutonomousDatabaseCatalogDatabase database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private DistributedAutonomousDatabaseCatalogDatabase database; + + public Builder database(DistributedAutonomousDatabaseCatalogDatabase database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseCatalogReplica build() { + DistributedAutonomousDatabaseCatalogReplica model = + new DistributedAutonomousDatabaseCatalogReplica(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseCatalogReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final DistributedAutonomousDatabaseCatalogDatabase database; + + public DistributedAutonomousDatabaseCatalogDatabase getDatabase() { + return database; + } + + @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("DistributedAutonomousDatabaseCatalogReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseCatalogReplica)) { + return false; + } + + DistributedAutonomousDatabaseCatalogReplica other = + (DistributedAutonomousDatabaseCatalogReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogWithDedicatedInfra.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogWithDedicatedInfra.java new file mode 100644 index 0000000000..f3dcadd097 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCatalogWithDedicatedInfra.java @@ -0,0 +1,865 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed autonomous database catalog on dedicated infrastructure. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseCatalogWithDedicatedInfra.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseCatalogWithDedicatedInfra + extends DistributedAutonomousDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The compute count for the catalog database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the catalog database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the catalog database. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @param isAutoScalingEnabled the value to set + * @return this builder + **/ + public Builder isAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.__explicitlySet__.add("isAutoScalingEnabled"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + * @param cloudAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder cloudAutonomousVmClusterId(String cloudAutonomousVmClusterId) { + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.__explicitlySet__.add("cloudAutonomousVmClusterId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + * @param okvKeyStoreId the value to set + * @return this builder + **/ + public Builder okvKeyStoreId(String okvKeyStoreId) { + this.okvKeyStoreId = okvKeyStoreId; + this.__explicitlySet__.add("okvKeyStoreId"); + return this; + } + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @param okvEndPointGroupName the value to set + * @return this builder + **/ + public Builder okvEndPointGroupName(String okvEndPointGroupName) { + this.okvEndPointGroupName = okvEndPointGroupName; + this.__explicitlySet__.add("okvEndPointGroupName"); + return this; + } + /** + * The protection mode for the catalog peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the catalog peer. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedAutonomousDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @param fastStartFailOverLagLimitInSeconds the value to set + * @return this builder + **/ + public Builder fastStartFailOverLagLimitInSeconds( + Integer fastStartFailOverLagLimitInSeconds) { + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.__explicitlySet__.add("fastStartFailOverLagLimitInSeconds"); + return this; + } + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + * @param standbyMaintenanceBufferInDays the value to set + * @return this builder + **/ + public Builder standbyMaintenanceBufferInDays(Integer standbyMaintenanceBufferInDays) { + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.__explicitlySet__.add("standbyMaintenanceBufferInDays"); + return this; + } + /** + * Status of the distributed autonomous database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed autonomous database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseCatalogWithDedicatedInfra build() { + DistributedAutonomousDatabaseCatalogWithDedicatedInfra model = + new DistributedAutonomousDatabaseCatalogWithDedicatedInfra( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.computeCount, + this.dataStorageSizeInGbs, + this.isAutoScalingEnabled, + this.cloudAutonomousVmClusterId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.okvKeyStoreId, + this.okvEndPointGroupName, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.standbyMaintenanceBufferInDays, + this.status, + this.supportingResourceId, + this.containerDatabaseId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseCatalogWithDedicatedInfra model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabled")) { + this.isAutoScalingEnabled(model.getIsAutoScalingEnabled()); + } + if (model.wasPropertyExplicitlySet("cloudAutonomousVmClusterId")) { + this.cloudAutonomousVmClusterId(model.getCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("okvKeyStoreId")) { + this.okvKeyStoreId(model.getOkvKeyStoreId()); + } + if (model.wasPropertyExplicitlySet("okvEndPointGroupName")) { + this.okvEndPointGroupName(model.getOkvEndPointGroupName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("standbyMaintenanceBufferInDays")) { + this.standbyMaintenanceBufferInDays(model.getStandbyMaintenanceBufferInDays()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedAutonomousDatabaseCatalogWithDedicatedInfra( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedAutonomousDbMetadata metadata, + Float computeCount, + Double dataStorageSizeInGbs, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays, + Status status, + String supportingResourceId, + String containerDatabaseId) { + super(name, timeCreated, timeUpdated, metadata); + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + } + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the catalog database. It has to be in multiples of 2. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the catalog database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the catalog database. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private final Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @return the value + **/ + public Boolean getIsAutoScalingEnabled() { + return isAutoScalingEnabled; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private final String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous VM Cluster. + * @return the value + **/ + public String getCloudAutonomousVmClusterId() { + return cloudAutonomousVmClusterId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private final String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the catalog. + * @return the value + **/ + public String getOkvKeyStoreId() { + return okvKeyStoreId; + } + + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private final String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @return the value + **/ + public String getOkvEndPointGroupName() { + return okvEndPointGroupName; + } + + /** + * The protection mode for the catalog peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the catalog peer. + * @return the value + **/ + public DistributedAutonomousDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private final Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * This value represents the number of days before scheduled maintenance of the primary database. + * + * @return the value + **/ + public Integer getStandbyMaintenanceBufferInDays() { + return standbyMaintenanceBufferInDays; + } + + /** + * Status of the distributed autonomous database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed autonomous database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed autonomous database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + @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("DistributedAutonomousDatabaseCatalogWithDedicatedInfra("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); + sb.append(", cloudAutonomousVmClusterId=") + .append(String.valueOf(this.cloudAutonomousVmClusterId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", okvKeyStoreId=").append(String.valueOf(this.okvKeyStoreId)); + sb.append(", okvEndPointGroupName=").append(String.valueOf(this.okvEndPointGroupName)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", standbyMaintenanceBufferInDays=") + .append(String.valueOf(this.standbyMaintenanceBufferInDays)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseCatalogWithDedicatedInfra)) { + return false; + } + + DistributedAutonomousDatabaseCatalogWithDedicatedInfra other = + (DistributedAutonomousDatabaseCatalogWithDedicatedInfra) o; + return java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) + && java.util.Objects.equals( + this.cloudAutonomousVmClusterId, other.cloudAutonomousVmClusterId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.okvKeyStoreId, other.okvKeyStoreId) + && java.util.Objects.equals(this.okvEndPointGroupName, other.okvEndPointGroupName) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals( + this.standbyMaintenanceBufferInDays, other.standbyMaintenanceBufferInDays) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.hashCode()); + result = + (result * PRIME) + + (this.isAutoScalingEnabled == null + ? 43 + : this.isAutoScalingEnabled.hashCode()); + result = + (result * PRIME) + + (this.cloudAutonomousVmClusterId == null + ? 43 + : this.cloudAutonomousVmClusterId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.okvKeyStoreId == null ? 43 : this.okvKeyStoreId.hashCode()); + result = + (result * PRIME) + + (this.okvEndPointGroupName == null + ? 43 + : this.okvEndPointGroupName.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = + (result * PRIME) + + (this.standbyMaintenanceBufferInDays == null + ? 43 + : this.standbyMaintenanceBufferInDays.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCollection.java new file mode 100644 index 0000000000..b2a1edf810 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Collection of Globally distributed autonomous databases. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DistributedAutonomousDatabaseCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Array of Globally distributed autonomous database summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Array of Globally distributed autonomous database summaries. + * @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 DistributedAutonomousDatabaseCollection build() { + DistributedAutonomousDatabaseCollection model = + new DistributedAutonomousDatabaseCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseCollection 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); + } + + /** + * Array of Globally distributed autonomous database summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Array of Globally distributed autonomous database summaries. + * @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("DistributedAutonomousDatabaseCollection("); + 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 DistributedAutonomousDatabaseCollection)) { + return false; + } + + DistributedAutonomousDatabaseCollection other = (DistributedAutonomousDatabaseCollection) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseConnectionString.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseConnectionString.java new file mode 100644 index 0000000000..333880ca94 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseConnectionString.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of Globally distributed autonomous database connection String. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseConnectionString.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseConnectionString + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"allConnectionStrings"}) + public DistributedAutonomousDatabaseConnectionString( + java.util.Map allConnectionStrings) { + super(); + this.allConnectionStrings = allConnectionStrings; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of connection strings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allConnectionStrings") + private java.util.Map allConnectionStrings; + + /** + * Collection of connection strings. + * @param allConnectionStrings the value to set + * @return this builder + **/ + public Builder allConnectionStrings(java.util.Map allConnectionStrings) { + this.allConnectionStrings = allConnectionStrings; + this.__explicitlySet__.add("allConnectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseConnectionString build() { + DistributedAutonomousDatabaseConnectionString model = + new DistributedAutonomousDatabaseConnectionString(this.allConnectionStrings); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseConnectionString model) { + if (model.wasPropertyExplicitlySet("allConnectionStrings")) { + this.allConnectionStrings(model.getAllConnectionStrings()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Collection of connection strings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allConnectionStrings") + private final java.util.Map allConnectionStrings; + + /** + * Collection of connection strings. + * @return the value + **/ + public java.util.Map getAllConnectionStrings() { + return allConnectionStrings; + } + + @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("DistributedAutonomousDatabaseConnectionString("); + sb.append("super=").append(super.toString()); + sb.append("allConnectionStrings=").append(String.valueOf(this.allConnectionStrings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseConnectionString)) { + return false; + } + + DistributedAutonomousDatabaseConnectionString other = + (DistributedAutonomousDatabaseConnectionString) o; + return java.util.Objects.equals(this.allConnectionStrings, other.allConnectionStrings) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.allConnectionStrings == null + ? 43 + : this.allConnectionStrings.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNode.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNode.java new file mode 100644 index 0000000000..f18e511255 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNode.java @@ -0,0 +1,453 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of Global Database Services Control(GDS CTL) instances for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseGdsControlNode.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseGdsControlNode + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "subnetId", + "availabilityDomain", + "timeCreated", + "timeUpdated", + "supportingResourceId", + "privateIp", + "gdsControlNodeImageDetails", + "metadata" + }) + public DistributedAutonomousDatabaseGdsControlNode( + String name, + String subnetId, + String availabilityDomain, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String supportingResourceId, + String privateIp, + DistributedAutonomousDatabaseGdsControlNodeImage gdsControlNodeImageDetails, + DistributedAutonomousDbMetadata metadata) { + super(); + this.name = name; + this.subnetId = subnetId; + this.availabilityDomain = availabilityDomain; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.supportingResourceId = supportingResourceId; + this.privateIp = privateIp; + this.gdsControlNodeImageDetails = gdsControlNodeImageDetails; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the Global Database Services Control instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the Global Database Services Control instance + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + * @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 time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + * @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 identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * The identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * IP address of the Global Database Services Control instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private String privateIp; + + /** + * IP address of the Global Database Services Control instance. + * @param privateIp the value to set + * @return this builder + **/ + public Builder privateIp(String privateIp) { + this.privateIp = privateIp; + this.__explicitlySet__.add("privateIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeImageDetails") + private DistributedAutonomousDatabaseGdsControlNodeImage gdsControlNodeImageDetails; + + public Builder gdsControlNodeImageDetails( + DistributedAutonomousDatabaseGdsControlNodeImage gdsControlNodeImageDetails) { + this.gdsControlNodeImageDetails = gdsControlNodeImageDetails; + this.__explicitlySet__.add("gdsControlNodeImageDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata 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 DistributedAutonomousDatabaseGdsControlNode build() { + DistributedAutonomousDatabaseGdsControlNode model = + new DistributedAutonomousDatabaseGdsControlNode( + this.name, + this.subnetId, + this.availabilityDomain, + this.timeCreated, + this.timeUpdated, + this.supportingResourceId, + this.privateIp, + this.gdsControlNodeImageDetails, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseGdsControlNode model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("privateIp")) { + this.privateIp(model.getPrivateIp()); + } + if (model.wasPropertyExplicitlySet("gdsControlNodeImageDetails")) { + this.gdsControlNodeImageDetails(model.getGdsControlNodeImageDetails()); + } + 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); + } + + /** + * Name of the Global Database Services Control instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the Global Database Services Control instance + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * The identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * IP address of the Global Database Services Control instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private final String privateIp; + + /** + * IP address of the Global Database Services Control instance. + * @return the value + **/ + public String getPrivateIp() { + return privateIp; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeImageDetails") + private final DistributedAutonomousDatabaseGdsControlNodeImage gdsControlNodeImageDetails; + + public DistributedAutonomousDatabaseGdsControlNodeImage getGdsControlNodeImageDetails() { + return gdsControlNodeImageDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata 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("DistributedAutonomousDatabaseGdsControlNode("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", gdsControlNodeImageDetails=") + .append(String.valueOf(this.gdsControlNodeImageDetails)); + 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 DistributedAutonomousDatabaseGdsControlNode)) { + return false; + } + + DistributedAutonomousDatabaseGdsControlNode other = + (DistributedAutonomousDatabaseGdsControlNode) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals( + this.gdsControlNodeImageDetails, other.gdsControlNodeImageDetails) + && 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.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.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.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.gdsControlNodeImageDetails == null + ? 43 + : this.gdsControlNodeImageDetails.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNodeImage.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNodeImage.java new file mode 100644 index 0000000000..3a08538593 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGdsControlNodeImage.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Global Database Services Control(GDS CTL) image details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseGdsControlNodeImage.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseGdsControlNodeImage + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "version"}) + public DistributedAutonomousDatabaseGdsControlNodeImage(String id, String version) { + super(); + this.id = id; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version associated with the image identified by id. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseGdsControlNodeImage build() { + DistributedAutonomousDatabaseGdsControlNodeImage model = + new DistributedAutonomousDatabaseGdsControlNodeImage(this.id, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseGdsControlNodeImage model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version associated with the image identified by id. + * @return the value + **/ + public String getVersion() { + return version; + } + + @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("DistributedAutonomousDatabaseGdsControlNodeImage("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseGdsControlNodeImage)) { + return false; + } + + DistributedAutonomousDatabaseGdsControlNodeImage other = + (DistributedAutonomousDatabaseGdsControlNodeImage) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.version, other.version) + && 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.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsm.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsm.java new file mode 100644 index 0000000000..5477818a53 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsm.java @@ -0,0 +1,543 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of global service manager(GSM also known as shard director) instances for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseGsm.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseGsm + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "computeCount", + "dataStorageSizeInGbs", + "timeCreated", + "timeUpdated", + "status", + "timeSslCertificateExpires", + "supportingResourceId", + "gsmImageDetails", + "metadata" + }) + public DistributedAutonomousDatabaseGsm( + String name, + Float computeCount, + Double dataStorageSizeInGbs, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Status status, + java.util.Date timeSslCertificateExpires, + String supportingResourceId, + DistributedAutonomousDatabaseGsmImage gsmImageDetails, + DistributedAutonomousDbMetadata metadata) { + super(); + this.name = name; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.status = status; + this.timeSslCertificateExpires = timeSslCertificateExpires; + this.supportingResourceId = supportingResourceId; + this.gsmImageDetails = gsmImageDetails; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the Global service manager instance. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The compute count for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the Global service manager instance. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + * @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 time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + * @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; + } + /** + * Status of the gsm for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the gsm for the Globally distributed autonomous database. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeSslCertificateExpires") + private java.util.Date timeSslCertificateExpires; + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string. + * @param timeSslCertificateExpires the value to set + * @return this builder + **/ + public Builder timeSslCertificateExpires(java.util.Date timeSslCertificateExpires) { + this.timeSslCertificateExpires = timeSslCertificateExpires; + this.__explicitlySet__.add("timeSslCertificateExpires"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gsmImageDetails") + private DistributedAutonomousDatabaseGsmImage gsmImageDetails; + + public Builder gsmImageDetails(DistributedAutonomousDatabaseGsmImage gsmImageDetails) { + this.gsmImageDetails = gsmImageDetails; + this.__explicitlySet__.add("gsmImageDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata 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 DistributedAutonomousDatabaseGsm build() { + DistributedAutonomousDatabaseGsm model = + new DistributedAutonomousDatabaseGsm( + this.name, + this.computeCount, + this.dataStorageSizeInGbs, + this.timeCreated, + this.timeUpdated, + this.status, + this.timeSslCertificateExpires, + this.supportingResourceId, + this.gsmImageDetails, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseGsm model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeSslCertificateExpires")) { + this.timeSslCertificateExpires(model.getTimeSslCertificateExpires()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("gsmImageDetails")) { + this.gsmImageDetails(model.getGsmImageDetails()); + } + 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); + } + + /** + * Name of the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the Global service manager instance. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The compute count for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the Global service manager instance. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Status of the gsm for the Globally distributed autonomous database. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the gsm for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the gsm for the Globally distributed autonomous database. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeSslCertificateExpires") + private final java.util.Date timeSslCertificateExpires; + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeSslCertificateExpires() { + return timeSslCertificateExpires; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gsmImageDetails") + private final DistributedAutonomousDatabaseGsmImage gsmImageDetails; + + public DistributedAutonomousDatabaseGsmImage getGsmImageDetails() { + return gsmImageDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata 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("DistributedAutonomousDatabaseGsm("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeSslCertificateExpires=") + .append(String.valueOf(this.timeSslCertificateExpires)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", gsmImageDetails=").append(String.valueOf(this.gsmImageDetails)); + 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 DistributedAutonomousDatabaseGsm)) { + return false; + } + + DistributedAutonomousDatabaseGsm other = (DistributedAutonomousDatabaseGsm) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals( + this.timeSslCertificateExpires, other.timeSslCertificateExpires) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.gsmImageDetails, other.gsmImageDetails) + && 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.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.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.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.timeSslCertificateExpires == null + ? 43 + : this.timeSslCertificateExpires.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.gsmImageDetails == null ? 43 : this.gsmImageDetails.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsmImage.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsmImage.java new file mode 100644 index 0000000000..f00a779f52 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseGsmImage.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Global service manager image details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseGsmImage.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseGsmImage + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "version"}) + public DistributedAutonomousDatabaseGsmImage(String id, String version) { + super(); + this.id = id; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version associated with the image identified by id. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseGsmImage build() { + DistributedAutonomousDatabaseGsmImage model = + new DistributedAutonomousDatabaseGsmImage(this.id, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseGsmImage model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version associated with the image identified by id. + * @return the value + **/ + public String getVersion() { + return version; + } + + @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("DistributedAutonomousDatabaseGsmImage("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseGsmImage)) { + return false; + } + + DistributedAutonomousDatabaseGsmImage other = (DistributedAutonomousDatabaseGsmImage) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.version, other.version) + && 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.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRaftMetric.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRaftMetric.java new file mode 100644 index 0000000000..4f158649f2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRaftMetric.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Raft metrics for shards and catalog for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseRaftMetric.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseRaftMetric + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"raftMetrics", "configTasks"}) + public DistributedAutonomousDatabaseRaftMetric( + java.util.Map raftMetrics, java.util.Map configTasks) { + super(); + this.raftMetrics = raftMetrics; + this.configTasks = configTasks; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Raft metrics for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftMetrics") + private java.util.Map raftMetrics; + + /** + * Raft metrics for the Globally distributed autonomous database. + * @param raftMetrics the value to set + * @return this builder + **/ + public Builder raftMetrics(java.util.Map raftMetrics) { + this.raftMetrics = raftMetrics; + this.__explicitlySet__.add("raftMetrics"); + return this; + } + /** + * Details of in-progress configuration tasks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configTasks") + private java.util.Map configTasks; + + /** + * Details of in-progress configuration tasks. + * @param configTasks the value to set + * @return this builder + **/ + public Builder configTasks(java.util.Map configTasks) { + this.configTasks = configTasks; + this.__explicitlySet__.add("configTasks"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseRaftMetric build() { + DistributedAutonomousDatabaseRaftMetric model = + new DistributedAutonomousDatabaseRaftMetric(this.raftMetrics, this.configTasks); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseRaftMetric model) { + if (model.wasPropertyExplicitlySet("raftMetrics")) { + this.raftMetrics(model.getRaftMetrics()); + } + if (model.wasPropertyExplicitlySet("configTasks")) { + this.configTasks(model.getConfigTasks()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Raft metrics for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftMetrics") + private final java.util.Map raftMetrics; + + /** + * Raft metrics for the Globally distributed autonomous database. + * @return the value + **/ + public java.util.Map getRaftMetrics() { + return raftMetrics; + } + + /** + * Details of in-progress configuration tasks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configTasks") + private final java.util.Map configTasks; + + /** + * Details of in-progress configuration tasks. + * @return the value + **/ + public java.util.Map getConfigTasks() { + return configTasks; + } + + @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("DistributedAutonomousDatabaseRaftMetric("); + sb.append("super=").append(super.toString()); + sb.append("raftMetrics=").append(String.valueOf(this.raftMetrics)); + sb.append(", configTasks=").append(String.valueOf(this.configTasks)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseRaftMetric)) { + return false; + } + + DistributedAutonomousDatabaseRaftMetric other = (DistributedAutonomousDatabaseRaftMetric) o; + return java.util.Objects.equals(this.raftMetrics, other.raftMetrics) + && java.util.Objects.equals(this.configTasks, other.configTasks) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.raftMetrics == null ? 43 : this.raftMetrics.hashCode()); + result = (result * PRIME) + (this.configTasks == null ? 43 : this.configTasks.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLog.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLog.java new file mode 100644 index 0000000000..7475004e62 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLog.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Move RU invocation history for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseRuChangeLog.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseRuChangeLog + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"ruChangeLog"}) + public DistributedAutonomousDatabaseRuChangeLog( + java.util.List ruChangeLog) { + super(); + this.ruChangeLog = ruChangeLog; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Ordered list of move RU invocations (latest first). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruChangeLog") + private java.util.List ruChangeLog; + + /** + * Ordered list of move RU invocations (latest first). + * @param ruChangeLog the value to set + * @return this builder + **/ + public Builder ruChangeLog( + java.util.List ruChangeLog) { + this.ruChangeLog = ruChangeLog; + this.__explicitlySet__.add("ruChangeLog"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseRuChangeLog build() { + DistributedAutonomousDatabaseRuChangeLog model = + new DistributedAutonomousDatabaseRuChangeLog(this.ruChangeLog); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseRuChangeLog model) { + if (model.wasPropertyExplicitlySet("ruChangeLog")) { + this.ruChangeLog(model.getRuChangeLog()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Ordered list of move RU invocations (latest first). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruChangeLog") + private final java.util.List ruChangeLog; + + /** + * Ordered list of move RU invocations (latest first). + * @return the value + **/ + public java.util.List getRuChangeLog() { + return ruChangeLog; + } + + @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("DistributedAutonomousDatabaseRuChangeLog("); + sb.append("super=").append(super.toString()); + sb.append("ruChangeLog=").append(String.valueOf(this.ruChangeLog)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseRuChangeLog)) { + return false; + } + + DistributedAutonomousDatabaseRuChangeLog other = + (DistributedAutonomousDatabaseRuChangeLog) o; + return java.util.Objects.equals(this.ruChangeLog, other.ruChangeLog) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.ruChangeLog == null ? 43 : this.ruChangeLog.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLogSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLogSummary.java new file mode 100644 index 0000000000..b269766a9e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseRuChangeLogSummary.java @@ -0,0 +1,435 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * One move RU invocation record for the Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseRuChangeLogSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseRuChangeLogSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "sourceShardName", + "targetShardName", + "ruId", + "status", + "triggeredBy", + "timeCreated", + "timeUpdated" + }) + public DistributedAutonomousDatabaseRuChangeLogSummary( + String sourceShardName, + String targetShardName, + String ruId, + Status status, + String triggeredBy, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.sourceShardName = sourceShardName; + this.targetShardName = targetShardName; + this.ruId = ruId; + this.status = status; + this.triggeredBy = triggeredBy; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Source shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private String sourceShardName; + + /** + * Source shard for move RU invocation. + * @param sourceShardName the value to set + * @return this builder + **/ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + this.__explicitlySet__.add("sourceShardName"); + return this; + } + /** + * Target shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetShardName") + private String targetShardName; + + /** + * Target shard for move RU invocation. + * @param targetShardName the value to set + * @return this builder + **/ + public Builder targetShardName(String targetShardName) { + this.targetShardName = targetShardName; + this.__explicitlySet__.add("targetShardName"); + return this; + } + /** + * Replication unit identifier associated with the invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruId") + private String ruId; + + /** + * Replication unit identifier associated with the invocation. + * @param ruId the value to set + * @return this builder + **/ + public Builder ruId(String ruId) { + this.ruId = ruId; + this.__explicitlySet__.add("ruId"); + return this; + } + /** + * Current or terminal status of the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Current or terminal status of the move RU invocation. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Actor who triggered the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("triggeredBy") + private String triggeredBy; + + /** + * Actor who triggered the move RU invocation. + * @param triggeredBy the value to set + * @return this builder + **/ + public Builder triggeredBy(String triggeredBy) { + this.triggeredBy = triggeredBy; + this.__explicitlySet__.add("triggeredBy"); + return this; + } + /** + * Entry creation timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Entry creation timestamp in UTC. + * @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; + } + /** + * Entry update timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Entry update timestamp in UTC. + * @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 DistributedAutonomousDatabaseRuChangeLogSummary build() { + DistributedAutonomousDatabaseRuChangeLogSummary model = + new DistributedAutonomousDatabaseRuChangeLogSummary( + this.sourceShardName, + this.targetShardName, + this.ruId, + this.status, + this.triggeredBy, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseRuChangeLogSummary model) { + if (model.wasPropertyExplicitlySet("sourceShardName")) { + this.sourceShardName(model.getSourceShardName()); + } + if (model.wasPropertyExplicitlySet("targetShardName")) { + this.targetShardName(model.getTargetShardName()); + } + if (model.wasPropertyExplicitlySet("ruId")) { + this.ruId(model.getRuId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("triggeredBy")) { + this.triggeredBy(model.getTriggeredBy()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + 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); + } + + /** + * Source shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private final String sourceShardName; + + /** + * Source shard for move RU invocation. + * @return the value + **/ + public String getSourceShardName() { + return sourceShardName; + } + + /** + * Target shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetShardName") + private final String targetShardName; + + /** + * Target shard for move RU invocation. + * @return the value + **/ + public String getTargetShardName() { + return targetShardName; + } + + /** + * Replication unit identifier associated with the invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruId") + private final String ruId; + + /** + * Replication unit identifier associated with the invocation. + * @return the value + **/ + public String getRuId() { + return ruId; + } + + /** + * Current or terminal status of the move RU invocation. + **/ + public enum Status { + Failed("FAILED"), + Queued("QUEUED"), + InProgress("IN_PROGRESS"), + Completed("COMPLETED"), + + /** + * 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Current or terminal status of the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Current or terminal status of the move RU invocation. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * Actor who triggered the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("triggeredBy") + private final String triggeredBy; + + /** + * Actor who triggered the move RU invocation. + * @return the value + **/ + public String getTriggeredBy() { + return triggeredBy; + } + + /** + * Entry creation timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Entry creation timestamp in UTC. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Entry update timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Entry update timestamp in UTC. + * @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("DistributedAutonomousDatabaseRuChangeLogSummary("); + sb.append("super=").append(super.toString()); + sb.append("sourceShardName=").append(String.valueOf(this.sourceShardName)); + sb.append(", targetShardName=").append(String.valueOf(this.targetShardName)); + sb.append(", ruId=").append(String.valueOf(this.ruId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", triggeredBy=").append(String.valueOf(this.triggeredBy)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + 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 DistributedAutonomousDatabaseRuChangeLogSummary)) { + return false; + } + + DistributedAutonomousDatabaseRuChangeLogSummary other = + (DistributedAutonomousDatabaseRuChangeLogSummary) o; + return java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.targetShardName, other.targetShardName) + && java.util.Objects.equals(this.ruId, other.ruId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.triggeredBy, other.triggeredBy) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && 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.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = + (result * PRIME) + + (this.targetShardName == null ? 43 : this.targetShardName.hashCode()); + result = (result * PRIME) + (this.ruId == null ? 43 : this.ruId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.triggeredBy == null ? 43 : this.triggeredBy.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardDatabase.java new file mode 100644 index 0000000000..7ce956cde7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardDatabase.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed autonomous database shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = DistributedAutonomousDatabaseShardDatabase.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedAutonomousDatabaseShardWithDedicatedInfra.class, + name = "ADBD_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DistributedAutonomousDatabaseShardDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "timeCreated", "timeUpdated", "metadata"}) + protected DistributedAutonomousDatabaseShardDatabase( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedAutonomousDbMetadata metadata) { + super(); + this.name = name; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.metadata = metadata; + } + + /** + * Name of the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the shard. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The time the shard was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the shard was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the shard was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the shard was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata 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("DistributedAutonomousDatabaseShardDatabase("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + 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 DistributedAutonomousDatabaseShardDatabase)) { + return false; + } + + DistributedAutonomousDatabaseShardDatabase other = + (DistributedAutonomousDatabaseShardDatabase) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && 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.name == null ? 43 : this.name.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.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed autonomous database type. + * Use ADBD_EXISTING_CLUSTER for an autonomous database on Dedicated Infrastructure that uses a pre-existing cluster. + * + **/ + public enum Source { + AdbdExistingCluster("ADBD_EXISTING_CLUSTER"), + + /** + * 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(Source.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Source', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardWithDedicatedInfra.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardWithDedicatedInfra.java new file mode 100644 index 0000000000..184b4799e9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseShardWithDedicatedInfra.java @@ -0,0 +1,861 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed autonomous database shard on dedicated infrastructure. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseShardWithDedicatedInfra.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseShardWithDedicatedInfra + extends DistributedAutonomousDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The compute count for the shard database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the shard database. It has to be in multiples of 2. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the shard database. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @param isAutoScalingEnabled the value to set + * @return this builder + **/ + public Builder isAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.__explicitlySet__.add("isAutoScalingEnabled"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * @param cloudAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder cloudAutonomousVmClusterId(String cloudAutonomousVmClusterId) { + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.__explicitlySet__.add("cloudAutonomousVmClusterId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + * @param okvKeyStoreId the value to set + * @return this builder + **/ + public Builder okvKeyStoreId(String okvKeyStoreId) { + this.okvKeyStoreId = okvKeyStoreId; + this.__explicitlySet__.add("okvKeyStoreId"); + return this; + } + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @param okvEndPointGroupName the value to set + * @return this builder + **/ + public Builder okvEndPointGroupName(String okvEndPointGroupName) { + this.okvEndPointGroupName = okvEndPointGroupName; + this.__explicitlySet__.add("okvEndPointGroupName"); + return this; + } + /** + * The protection mode for the shard peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the shard peer. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedAutonomousDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @param fastStartFailOverLagLimitInSeconds the value to set + * @return this builder + **/ + public Builder fastStartFailOverLagLimitInSeconds( + Integer fastStartFailOverLagLimitInSeconds) { + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.__explicitlySet__.add("fastStartFailOverLagLimitInSeconds"); + return this; + } + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + * @param standbyMaintenanceBufferInDays the value to set + * @return this builder + **/ + public Builder standbyMaintenanceBufferInDays(Integer standbyMaintenanceBufferInDays) { + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.__explicitlySet__.add("standbyMaintenanceBufferInDays"); + return this; + } + /** + * Status of the distributed autonomous database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed autonomous database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDatabaseShardWithDedicatedInfra build() { + DistributedAutonomousDatabaseShardWithDedicatedInfra model = + new DistributedAutonomousDatabaseShardWithDedicatedInfra( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.computeCount, + this.dataStorageSizeInGbs, + this.isAutoScalingEnabled, + this.cloudAutonomousVmClusterId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.okvKeyStoreId, + this.okvEndPointGroupName, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.standbyMaintenanceBufferInDays, + this.status, + this.supportingResourceId, + this.containerDatabaseId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseShardWithDedicatedInfra model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabled")) { + this.isAutoScalingEnabled(model.getIsAutoScalingEnabled()); + } + if (model.wasPropertyExplicitlySet("cloudAutonomousVmClusterId")) { + this.cloudAutonomousVmClusterId(model.getCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("okvKeyStoreId")) { + this.okvKeyStoreId(model.getOkvKeyStoreId()); + } + if (model.wasPropertyExplicitlySet("okvEndPointGroupName")) { + this.okvEndPointGroupName(model.getOkvEndPointGroupName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("standbyMaintenanceBufferInDays")) { + this.standbyMaintenanceBufferInDays(model.getStandbyMaintenanceBufferInDays()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedAutonomousDatabaseShardWithDedicatedInfra( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedAutonomousDbMetadata metadata, + Float computeCount, + Double dataStorageSizeInGbs, + Boolean isAutoScalingEnabled, + String cloudAutonomousVmClusterId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + String okvKeyStoreId, + String okvEndPointGroupName, + DistributedAutonomousDbProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + Integer standbyMaintenanceBufferInDays, + Status status, + String supportingResourceId, + String containerDatabaseId) { + super(name, timeCreated, timeUpdated, metadata); + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.cloudAutonomousVmClusterId = cloudAutonomousVmClusterId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.okvKeyStoreId = okvKeyStoreId; + this.okvEndPointGroupName = okvEndPointGroupName; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + } + + /** + * The compute count for the shard database. It has to be in multiples of 2. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the shard database. It has to be in multiples of 2. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the shard database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the shard database. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private final Boolean isAutoScalingEnabled; + + /** + * Indicates if vertical auto scaling is enabled for the Autonomous AI Database CPU core count. + * The default value is {@code FALSE}. + * + * @return the value + **/ + public Boolean getIsAutoScalingEnabled() { + return isAutoScalingEnabled; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutonomousVmClusterId") + private final String cloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * @return the value + **/ + public String getCloudAutonomousVmClusterId() { + return cloudAutonomousVmClusterId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKeyStoreId") + private final String okvKeyStoreId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store used to create the shard. + * @return the value + **/ + public String getOkvKeyStoreId() { + return okvKeyStoreId; + } + + /** + * The OKV endpoint name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvEndPointGroupName") + private final String okvEndPointGroupName; + + /** + * The OKV endpoint name. + * @return the value + **/ + public String getOkvEndPointGroupName() { + return okvEndPointGroupName; + } + + /** + * The protection mode for the shard peer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedAutonomousDbProtectionMode protectionMode; + + /** + * The protection mode for the shard peer. + * @return the value + **/ + public DistributedAutonomousDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("standbyMaintenanceBufferInDays") + private final Integer standbyMaintenanceBufferInDays; + + /** + * The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + * + * @return the value + **/ + public Integer getStandbyMaintenanceBufferInDays() { + return standbyMaintenanceBufferInDays; + } + + /** + * Status of the distributed autonomous database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed autonomous database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed autonomous database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + @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("DistributedAutonomousDatabaseShardWithDedicatedInfra("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); + sb.append(", cloudAutonomousVmClusterId=") + .append(String.valueOf(this.cloudAutonomousVmClusterId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", okvKeyStoreId=").append(String.valueOf(this.okvKeyStoreId)); + sb.append(", okvEndPointGroupName=").append(String.valueOf(this.okvEndPointGroupName)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", standbyMaintenanceBufferInDays=") + .append(String.valueOf(this.standbyMaintenanceBufferInDays)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDatabaseShardWithDedicatedInfra)) { + return false; + } + + DistributedAutonomousDatabaseShardWithDedicatedInfra other = + (DistributedAutonomousDatabaseShardWithDedicatedInfra) o; + return java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) + && java.util.Objects.equals( + this.cloudAutonomousVmClusterId, other.cloudAutonomousVmClusterId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.okvKeyStoreId, other.okvKeyStoreId) + && java.util.Objects.equals(this.okvEndPointGroupName, other.okvEndPointGroupName) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals( + this.standbyMaintenanceBufferInDays, other.standbyMaintenanceBufferInDays) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.hashCode()); + result = + (result * PRIME) + + (this.isAutoScalingEnabled == null + ? 43 + : this.isAutoScalingEnabled.hashCode()); + result = + (result * PRIME) + + (this.cloudAutonomousVmClusterId == null + ? 43 + : this.cloudAutonomousVmClusterId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.okvKeyStoreId == null ? 43 : this.okvKeyStoreId.hashCode()); + result = + (result * PRIME) + + (this.okvEndPointGroupName == null + ? 43 + : this.okvEndPointGroupName.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = + (result * PRIME) + + (this.standbyMaintenanceBufferInDays == null + ? 43 + : this.standbyMaintenanceBufferInDays.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseSummary.java new file mode 100644 index 0000000000..1c00c5743a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDatabaseSummary.java @@ -0,0 +1,1440 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed autonomous database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDatabaseSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDatabaseSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "databaseVersion", + "lifecycleState", + "lifecycleDetails", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "dbWorkloadType", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "systemChunkCount", + "autoResourceManagementConfig", + "systemRaftReplicationUnitCount", + "metadata", + "shardingMethod", + "replicationMethod", + "dbDeploymentType", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedAutonomousDatabaseSummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String databaseVersion, + DistributedAutonomousDatabase.LifecycleState lifecycleState, + String lifecycleDetails, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + DistributedAutonomousDatabase.DbWorkloadType dbWorkloadType, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer systemChunkCount, + AutoResourceManagementConfigurationDetails autoResourceManagementConfig, + Integer systemRaftReplicationUnitCount, + DistributedAutonomousDbMetadata metadata, + ShardingMethod shardingMethod, + ReplicationMethod replicationMethod, + DbDeploymentType dbDeploymentType, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.databaseVersion = databaseVersion; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.dbWorkloadType = dbWorkloadType; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.systemChunkCount = systemChunkCount; + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.metadata = metadata; + this.shardingMethod = shardingMethod; + this.replicationMethod = replicationMethod; + this.dbDeploymentType = dbDeploymentType; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + * @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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string + * @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 time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string + * @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; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Lifecycle state of sharded database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DistributedAutonomousDatabase.LifecycleState lifecycleState; + + /** + * Lifecycle state of sharded database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DistributedAutonomousDatabase.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The lifecycleDetails for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The workload type for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private DistributedAutonomousDatabase.DbWorkloadType dbWorkloadType; + + /** + * The workload type for the database. + * @param dbWorkloadType the value to set + * @return this builder + **/ + public Builder dbWorkloadType(DistributedAutonomousDatabase.DbWorkloadType dbWorkloadType) { + this.dbWorkloadType = dbWorkloadType; + this.__explicitlySet__.add("dbWorkloadType"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed autonomous database. + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * Ons local port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * Ons local port number for the Globally distributed autonomous database. + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * Ons remote port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * Ons remote port number for the Globally distributed autonomous database. + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public Builder autoResourceManagementConfig( + AutoResourceManagementConfigurationDetails autoResourceManagementConfig) { + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.__explicitlySet__.add("autoResourceManagementConfig"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedAutonomousDbMetadata metadata; + + public Builder metadata(DistributedAutonomousDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed autonomous database. + * @param shardingMethod the value to set + * @return this builder + **/ + public Builder shardingMethod(ShardingMethod shardingMethod) { + this.shardingMethod = shardingMethod; + this.__explicitlySet__.add("shardingMethod"); + return this; + } + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @param replicationMethod the value to set + * @return this builder + **/ + public Builder replicationMethod(ReplicationMethod replicationMethod) { + this.replicationMethod = replicationMethod; + this.__explicitlySet__.add("replicationMethod"); + return this; + } + /** + * The distributed autonomous database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private DbDeploymentType dbDeploymentType; + + /** + * The distributed autonomous database deployment type. + * + * @param dbDeploymentType the value to set + * @return this builder + **/ + public Builder dbDeploymentType(DbDeploymentType dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + this.__explicitlySet__.add("dbDeploymentType"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedAutonomousDatabaseSummary build() { + DistributedAutonomousDatabaseSummary model = + new DistributedAutonomousDatabaseSummary( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.databaseVersion, + this.lifecycleState, + this.lifecycleDetails, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.dbWorkloadType, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.systemChunkCount, + this.autoResourceManagementConfig, + this.systemRaftReplicationUnitCount, + this.metadata, + this.shardingMethod, + this.replicationMethod, + this.dbDeploymentType, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDatabaseSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("dbWorkloadType")) { + this.dbWorkloadType(model.getDbWorkloadType()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("autoResourceManagementConfig")) { + this.autoResourceManagementConfig(model.getAutoResourceManagementConfig()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("shardingMethod")) { + this.shardingMethod(model.getShardingMethod()); + } + if (model.wasPropertyExplicitlySet("replicationMethod")) { + this.replicationMethod(model.getReplicationMethod()); + } + if (model.wasPropertyExplicitlySet("dbDeploymentType")) { + this.dbDeploymentType(model.getDbDeploymentType()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed autonomous database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed autonomous database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Globally distributed autonomous database was created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Globally distributed autonomous database was last updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed autonomous database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Lifecycle state of sharded database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DistributedAutonomousDatabase.LifecycleState lifecycleState; + + /** + * Lifecycle state of sharded database. + * @return the value + **/ + public DistributedAutonomousDatabase.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed autonomous database. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed autonomous databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The workload type for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkloadType") + private final DistributedAutonomousDatabase.DbWorkloadType dbWorkloadType; + + /** + * The workload type for the database. + * @return the value + **/ + public DistributedAutonomousDatabase.DbWorkloadType getDbWorkloadType() { + return dbWorkloadType; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The listener port number for the Globally distributed autonomous database. + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed autonomous database. + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * Ons local port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * Ons local port number for the Globally distributed autonomous database. + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * Ons remote port number for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * Ons remote port number for the Globally distributed autonomous database. + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private final AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public AutoResourceManagementConfigurationDetails getAutoResourceManagementConfig() { + return autoResourceManagementConfig; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedAutonomousDbMetadata metadata; + + public DistributedAutonomousDbMetadata getMetadata() { + return metadata; + } + + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + public enum ShardingMethod { + User("USER"), + System("SYSTEM"), + Composite("COMPOSITE"), + + /** + * 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(ShardingMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShardingMethod v : ShardingMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ShardingMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShardingMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ShardingMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Sharding methods for the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private final ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed autonomous database. + * @return the value + **/ + public ShardingMethod getShardingMethod() { + return shardingMethod; + } + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + public enum ReplicationMethod { + Raft("RAFT"), + Dg("DG"), + + /** + * 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(ReplicationMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ReplicationMethod v : ReplicationMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ReplicationMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ReplicationMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ReplicationMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private final ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed Autonomous database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @return the value + **/ + public ReplicationMethod getReplicationMethod() { + return replicationMethod; + } + + /** + * The distributed autonomous database deployment type. + * + **/ + public enum DbDeploymentType { + AdbD("ADB_D"), + + /** + * 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(DbDeploymentType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbDeploymentType v : DbDeploymentType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DbDeploymentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbDeploymentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DbDeploymentType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The distributed autonomous database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private final DbDeploymentType dbDeploymentType; + + /** + * The distributed autonomous database deployment type. + * + * @return the value + **/ + public DbDeploymentType getDbDeploymentType() { + return dbDeploymentType; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedAutonomousDatabaseSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", dbWorkloadType=").append(String.valueOf(this.dbWorkloadType)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", autoResourceManagementConfig=") + .append(String.valueOf(this.autoResourceManagementConfig)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", shardingMethod=").append(String.valueOf(this.shardingMethod)); + sb.append(", replicationMethod=").append(String.valueOf(this.replicationMethod)); + sb.append(", dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + 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 DistributedAutonomousDatabaseSummary)) { + return false; + } + + DistributedAutonomousDatabaseSummary other = (DistributedAutonomousDatabaseSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.dbWorkloadType, other.dbWorkloadType) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.autoResourceManagementConfig, other.autoResourceManagementConfig) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.shardingMethod, other.shardingMethod) + && java.util.Objects.equals(this.replicationMethod, other.replicationMethod) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && 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.displayName == null ? 43 : this.displayName.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.databaseVersion == null ? 43 : this.databaseVersion.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.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = + (result * PRIME) + + (this.dbWorkloadType == null ? 43 : this.dbWorkloadType.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.autoResourceManagementConfig == null + ? 43 + : this.autoResourceManagementConfig.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.shardingMethod == null ? 43 : this.shardingMethod.hashCode()); + result = + (result * PRIME) + + (this.replicationMethod == null ? 43 : this.replicationMethod.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupConfig.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupConfig.java new file mode 100644 index 0000000000..4629585544 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Backup options for the Distributed Autonomous Database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDbBackupConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDbBackupConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"backupDestinationDetails", "recoveryWindowInDays"}) + public DistributedAutonomousDbBackupConfig( + java.util.List backupDestinationDetails, + Integer recoveryWindowInDays) { + super(); + this.backupDestinationDetails = backupDestinationDetails; + this.recoveryWindowInDays = recoveryWindowInDays; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Backup destination details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private java.util.List backupDestinationDetails; + + /** + * Backup destination details. + * @param backupDestinationDetails the value to set + * @return this builder + **/ + public Builder backupDestinationDetails( + java.util.List backupDestinationDetails) { + this.backupDestinationDetails = backupDestinationDetails; + this.__explicitlySet__.add("backupDestinationDetails"); + return this; + } + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups. When the value is updated, it is applied to all existing automatic backups. + * If the number of specified days is 0 then there will be no backups. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recoveryWindowInDays") + private Integer recoveryWindowInDays; + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups. When the value is updated, it is applied to all existing automatic backups. + * If the number of specified days is 0 then there will be no backups. + * + * @param recoveryWindowInDays the value to set + * @return this builder + **/ + public Builder recoveryWindowInDays(Integer recoveryWindowInDays) { + this.recoveryWindowInDays = recoveryWindowInDays; + this.__explicitlySet__.add("recoveryWindowInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDbBackupConfig build() { + DistributedAutonomousDbBackupConfig model = + new DistributedAutonomousDbBackupConfig( + this.backupDestinationDetails, this.recoveryWindowInDays); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDbBackupConfig model) { + if (model.wasPropertyExplicitlySet("backupDestinationDetails")) { + this.backupDestinationDetails(model.getBackupDestinationDetails()); + } + if (model.wasPropertyExplicitlySet("recoveryWindowInDays")) { + this.recoveryWindowInDays(model.getRecoveryWindowInDays()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Backup destination details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private final java.util.List backupDestinationDetails; + + /** + * Backup destination details. + * @return the value + **/ + public java.util.List getBackupDestinationDetails() { + return backupDestinationDetails; + } + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups. When the value is updated, it is applied to all existing automatic backups. + * If the number of specified days is 0 then there will be no backups. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recoveryWindowInDays") + private final Integer recoveryWindowInDays; + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups. When the value is updated, it is applied to all existing automatic backups. + * If the number of specified days is 0 then there will be no backups. + * + * @return the value + **/ + public Integer getRecoveryWindowInDays() { + return recoveryWindowInDays; + } + + @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("DistributedAutonomousDbBackupConfig("); + sb.append("super=").append(super.toString()); + sb.append("backupDestinationDetails=") + .append(String.valueOf(this.backupDestinationDetails)); + sb.append(", recoveryWindowInDays=").append(String.valueOf(this.recoveryWindowInDays)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDbBackupConfig)) { + return false; + } + + DistributedAutonomousDbBackupConfig other = (DistributedAutonomousDbBackupConfig) o; + return java.util.Objects.equals( + this.backupDestinationDetails, other.backupDestinationDetails) + && java.util.Objects.equals(this.recoveryWindowInDays, other.recoveryWindowInDays) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.backupDestinationDetails == null + ? 43 + : this.backupDestinationDetails.hashCode()); + result = + (result * PRIME) + + (this.recoveryWindowInDays == null + ? 43 + : this.recoveryWindowInDays.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupDestination.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupDestination.java new file mode 100644 index 0000000000..4f1c333c10 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbBackupDestination.java @@ -0,0 +1,404 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Backup destination details + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDbBackupDestination.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDbBackupDestination + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "type", + "id", + "internetProxy", + "dbrsPolicyId", + "isRemote", + "remoteRegion" + }) + public DistributedAutonomousDbBackupDestination( + Type type, + String id, + String internetProxy, + String dbrsPolicyId, + Boolean isRemote, + String remoteRegion) { + super(); + this.type = type; + this.id = id; + this.internetProxy = internetProxy; + this.dbrsPolicyId = dbrsPolicyId; + this.isRemote = isRemote; + this.remoteRegion = remoteRegion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the database backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the database backup destination. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Proxy URL to connect to object store. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("internetProxy") + private String internetProxy; + + /** + * Proxy URL to connect to object store. + * @param internetProxy the value to set + * @return this builder + **/ + public Builder internetProxy(String internetProxy) { + this.internetProxy = internetProxy; + this.__explicitlySet__.add("internetProxy"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbrsPolicyId") + private String dbrsPolicyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + * @param dbrsPolicyId the value to set + * @return this builder + **/ + public Builder dbrsPolicyId(String dbrsPolicyId) { + this.dbrsPolicyId = dbrsPolicyId; + this.__explicitlySet__.add("dbrsPolicyId"); + return this; + } + /** + * Indicates whether the backup destination is cross-region or local region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemote") + private Boolean isRemote; + + /** + * Indicates whether the backup destination is cross-region or local region. + * @param isRemote the value to set + * @return this builder + **/ + public Builder isRemote(Boolean isRemote) { + this.isRemote = isRemote; + this.__explicitlySet__.add("isRemote"); + return this; + } + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @param remoteRegion the value to set + * @return this builder + **/ + public Builder remoteRegion(String remoteRegion) { + this.remoteRegion = remoteRegion; + this.__explicitlySet__.add("remoteRegion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDbBackupDestination build() { + DistributedAutonomousDbBackupDestination model = + new DistributedAutonomousDbBackupDestination( + this.type, + this.id, + this.internetProxy, + this.dbrsPolicyId, + this.isRemote, + this.remoteRegion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDbBackupDestination model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("internetProxy")) { + this.internetProxy(model.getInternetProxy()); + } + if (model.wasPropertyExplicitlySet("dbrsPolicyId")) { + this.dbrsPolicyId(model.getDbrsPolicyId()); + } + if (model.wasPropertyExplicitlySet("isRemote")) { + this.isRemote(model.getIsRemote()); + } + if (model.wasPropertyExplicitlySet("remoteRegion")) { + this.remoteRegion(model.getRemoteRegion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the database backup destination. + **/ + public enum Type { + Nfs("NFS"), + ObjectStore("OBJECT_STORE"), + Local("LOCAL"), + Dbrs("DBRS"), + + /** + * 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(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Type of the database backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the database backup destination. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Proxy URL to connect to object store. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("internetProxy") + private final String internetProxy; + + /** + * Proxy URL to connect to object store. + * @return the value + **/ + public String getInternetProxy() { + return internetProxy; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbrsPolicyId") + private final String dbrsPolicyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + * @return the value + **/ + public String getDbrsPolicyId() { + return dbrsPolicyId; + } + + /** + * Indicates whether the backup destination is cross-region or local region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemote") + private final Boolean isRemote; + + /** + * Indicates whether the backup destination is cross-region or local region. + * @return the value + **/ + public Boolean getIsRemote() { + return isRemote; + } + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private final String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @return the value + **/ + public String getRemoteRegion() { + return remoteRegion; + } + + @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("DistributedAutonomousDbBackupDestination("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", internetProxy=").append(String.valueOf(this.internetProxy)); + sb.append(", dbrsPolicyId=").append(String.valueOf(this.dbrsPolicyId)); + sb.append(", isRemote=").append(String.valueOf(this.isRemote)); + sb.append(", remoteRegion=").append(String.valueOf(this.remoteRegion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDbBackupDestination)) { + return false; + } + + DistributedAutonomousDbBackupDestination other = + (DistributedAutonomousDbBackupDestination) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.internetProxy, other.internetProxy) + && java.util.Objects.equals(this.dbrsPolicyId, other.dbrsPolicyId) + && java.util.Objects.equals(this.isRemote, other.isRemote) + && java.util.Objects.equals(this.remoteRegion, other.remoteRegion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.internetProxy == null ? 43 : this.internetProxy.hashCode()); + result = (result * PRIME) + (this.dbrsPolicyId == null ? 43 : this.dbrsPolicyId.hashCode()); + result = (result * PRIME) + (this.isRemote == null ? 43 : this.isRemote.hashCode()); + result = (result * PRIME) + (this.remoteRegion == null ? 43 : this.remoteRegion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbMetadata.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbMetadata.java new file mode 100644 index 0000000000..f0beaa6df9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbMetadata.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Additional metadata related to Globally distributed autonomous database resources. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedAutonomousDbMetadata.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedAutonomousDbMetadata + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"map"}) + public DistributedAutonomousDbMetadata(java.util.Map map) { + super(); + this.map = map; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The map containing key-value pair of additional metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("map") + private java.util.Map map; + + /** + * The map containing key-value pair of additional metadata. + * @param map the value to set + * @return this builder + **/ + public Builder map(java.util.Map map) { + this.map = map; + this.__explicitlySet__.add("map"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedAutonomousDbMetadata build() { + DistributedAutonomousDbMetadata model = new DistributedAutonomousDbMetadata(this.map); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedAutonomousDbMetadata model) { + if (model.wasPropertyExplicitlySet("map")) { + this.map(model.getMap()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The map containing key-value pair of additional metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("map") + private final java.util.Map map; + + /** + * The map containing key-value pair of additional metadata. + * @return the value + **/ + public java.util.Map getMap() { + return map; + } + + @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("DistributedAutonomousDbMetadata("); + sb.append("super=").append(super.toString()); + sb.append("map=").append(String.valueOf(this.map)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedAutonomousDbMetadata)) { + return false; + } + + DistributedAutonomousDbMetadata other = (DistributedAutonomousDbMetadata) o; + return java.util.Objects.equals(this.map, other.map) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.map == null ? 43 : this.map.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbProtectionMode.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbProtectionMode.java new file mode 100644 index 0000000000..d810957645 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedAutonomousDbProtectionMode.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The protection mode of this Autonomous Data Guard association. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum DistributedAutonomousDbProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + + /** + * 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(DistributedAutonomousDbProtectionMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DistributedAutonomousDbProtectionMode v : + DistributedAutonomousDbProtectionMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DistributedAutonomousDbProtectionMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DistributedAutonomousDbProtectionMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DistributedAutonomousDbProtectionMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabase.java new file mode 100644 index 0000000000..e1ec474d4a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabase.java @@ -0,0 +1,2000 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabase extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "databaseVersion", + "lifecycleState", + "shardingMethod", + "replicationMethod", + "dbDeploymentType", + "lifecycleDetails", + "connectionStrings", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "latestGsmImageDetails", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "scanListenerPort", + "systemChunkCount", + "systemRaftReplicationUnitCount", + "compositeRaftShardSpaces", + "compositeDataGuardShardSpaces", + "systemRaftClusters", + "systemDataGuardDatabases", + "userShardSpaces", + "catalogDetails", + "gsmDetails", + "gdsControlNodeDetails", + "dbBackupConfig", + "autoResourceManagementConfig", + "gsmSshPublicKey", + "vcnNsgIds", + "metadata", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedDatabase( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String databaseVersion, + LifecycleState lifecycleState, + ShardingMethod shardingMethod, + ReplicationMethod replicationMethod, + DbDeploymentType dbDeploymentType, + String lifecycleDetails, + DistributedDbConnectionString connectionStrings, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + DistributedDbGsmImage latestGsmImageDetails, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer scanListenerPort, + Integer systemChunkCount, + Integer systemRaftReplicationUnitCount, + java.util.List compositeRaftShardSpaces, + java.util.List compositeDataGuardShardSpaces, + java.util.List systemRaftClusters, + SystemDataGuardDatabase systemDataGuardDatabases, + java.util.List userShardSpaces, + java.util.List catalogDetails, + java.util.List gsmDetails, + java.util.List gdsControlNodeDetails, + DistributedDbBackupConfig dbBackupConfig, + AutoResourceManagementConfigurationDetails autoResourceManagementConfig, + String gsmSshPublicKey, + java.util.List vcnNsgIds, + DistributedDbMetadata metadata, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.databaseVersion = databaseVersion; + this.lifecycleState = lifecycleState; + this.shardingMethod = shardingMethod; + this.replicationMethod = replicationMethod; + this.dbDeploymentType = dbDeploymentType; + this.lifecycleDetails = lifecycleDetails; + this.connectionStrings = connectionStrings; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.latestGsmImageDetails = latestGsmImageDetails; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.scanListenerPort = scanListenerPort; + this.systemChunkCount = systemChunkCount; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.systemRaftClusters = systemRaftClusters; + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.userShardSpaces = userShardSpaces; + this.catalogDetails = catalogDetails; + this.gsmDetails = gsmDetails; + this.gdsControlNodeDetails = gdsControlNodeDetails; + this.dbBackupConfig = dbBackupConfig; + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.gsmSshPublicKey = gsmSshPublicKey; + this.vcnNsgIds = vcnNsgIds; + this.metadata = metadata; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + * @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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string. + * @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 time the Globally distributed database was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string. + * @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; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Lifecycle states for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * Lifecycle states for the Globally distributed database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Sharding methods for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed database. + * @param shardingMethod the value to set + * @return this builder + **/ + public Builder shardingMethod(ShardingMethod shardingMethod) { + this.shardingMethod = shardingMethod; + this.__explicitlySet__.add("shardingMethod"); + return this; + } + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @param replicationMethod the value to set + * @return this builder + **/ + public Builder replicationMethod(ReplicationMethod replicationMethod) { + this.replicationMethod = replicationMethod; + this.__explicitlySet__.add("replicationMethod"); + return this; + } + /** + * The distributed database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private DbDeploymentType dbDeploymentType; + + /** + * The distributed database deployment type. + * + * @param dbDeploymentType the value to set + * @return this builder + **/ + public Builder dbDeploymentType(DbDeploymentType dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + this.__explicitlySet__.add("dbDeploymentType"); + return this; + } + /** + * The lifecycleDetails for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed database. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + private DistributedDbConnectionString connectionStrings; + + public Builder connectionStrings(DistributedDbConnectionString connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("latestGsmImageDetails") + private DistributedDbGsmImage latestGsmImageDetails; + + public Builder latestGsmImageDetails(DistributedDbGsmImage latestGsmImageDetails) { + this.latestGsmImageDetails = latestGsmImageDetails; + this.__explicitlySet__.add("latestGsmImageDetails"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The Global service manager listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The Global service manager listener port number for the Globally distributed database. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed database. + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * Ons local port number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * Ons local port number. + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * Ons remote port number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * Ons remote port number. + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * The TCP SCAN listener port for database clusters with source type XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPort") + private Integer scanListenerPort; + + /** + * The TCP SCAN listener port for database clusters with source type XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * @param scanListenerPort the value to set + * @return this builder + **/ + public Builder scanListenerPort(Integer scanListenerPort) { + this.scanListenerPort = scanListenerPort; + this.__explicitlySet__.add("scanListenerPort"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @param compositeRaftShardSpaces the value to set + * @return this builder + **/ + public Builder compositeRaftShardSpaces( + java.util.List compositeRaftShardSpaces) { + this.compositeRaftShardSpaces = compositeRaftShardSpaces; + this.__explicitlySet__.add("compositeRaftShardSpaces"); + return this; + } + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private java.util.List compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @param compositeDataGuardShardSpaces the value to set + * @return this builder + **/ + public Builder compositeDataGuardShardSpaces( + java.util.List compositeDataGuardShardSpaces) { + this.compositeDataGuardShardSpaces = compositeDataGuardShardSpaces; + this.__explicitlySet__.add("compositeDataGuardShardSpaces"); + return this; + } + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @param systemRaftClusters the value to set + * @return this builder + **/ + public Builder systemRaftClusters(java.util.List systemRaftClusters) { + this.systemRaftClusters = systemRaftClusters; + this.__explicitlySet__.add("systemRaftClusters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private SystemDataGuardDatabase systemDataGuardDatabases; + + public Builder systemDataGuardDatabases(SystemDataGuardDatabase systemDataGuardDatabases) { + this.systemDataGuardDatabases = systemDataGuardDatabases; + this.__explicitlySet__.add("systemDataGuardDatabases"); + return this; + } + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @param userShardSpaces the value to set + * @return this builder + **/ + public Builder userShardSpaces(java.util.List userShardSpaces) { + this.userShardSpaces = userShardSpaces; + this.__explicitlySet__.add("userShardSpaces"); + return this; + } + /** + * Catalog details associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private java.util.List catalogDetails; + + /** + * Catalog details associated with the distributed database. + * @param catalogDetails the value to set + * @return this builder + **/ + public Builder catalogDetails(java.util.List catalogDetails) { + this.catalogDetails = catalogDetails; + this.__explicitlySet__.add("catalogDetails"); + return this; + } + /** + * Global Service Manager (GSM) instances associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmDetails") + private java.util.List gsmDetails; + + /** + * Global Service Manager (GSM) instances associated with the distributed database. + * @param gsmDetails the value to set + * @return this builder + **/ + public Builder gsmDetails(java.util.List gsmDetails) { + this.gsmDetails = gsmDetails; + this.__explicitlySet__.add("gsmDetails"); + return this; + } + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeDetails") + private java.util.List gdsControlNodeDetails; + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed database. + * @param gdsControlNodeDetails the value to set + * @return this builder + **/ + public Builder gdsControlNodeDetails( + java.util.List gdsControlNodeDetails) { + this.gdsControlNodeDetails = gdsControlNodeDetails; + this.__explicitlySet__.add("gdsControlNodeDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DistributedDbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DistributedDbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public Builder autoResourceManagementConfig( + AutoResourceManagementConfigurationDetails autoResourceManagementConfig) { + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.__explicitlySet__.add("autoResourceManagementConfig"); + return this; + } + /** + * The SSH public key for Global service manager instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmSshPublicKey") + private String gsmSshPublicKey; + + /** + * The SSH public key for Global service manager instances. + * @param gsmSshPublicKey the value to set + * @return this builder + **/ + public Builder gsmSshPublicKey(String gsmSshPublicKey) { + this.gsmSshPublicKey = gsmSshPublicKey; + this.__explicitlySet__.add("gsmSshPublicKey"); + return this; + } + /** + * The list of network security group (NSG) details associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the distributed database. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedDatabase build() { + DistributedDatabase model = + new DistributedDatabase( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.databaseVersion, + this.lifecycleState, + this.shardingMethod, + this.replicationMethod, + this.dbDeploymentType, + this.lifecycleDetails, + this.connectionStrings, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.latestGsmImageDetails, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.scanListenerPort, + this.systemChunkCount, + this.systemRaftReplicationUnitCount, + this.compositeRaftShardSpaces, + this.compositeDataGuardShardSpaces, + this.systemRaftClusters, + this.systemDataGuardDatabases, + this.userShardSpaces, + this.catalogDetails, + this.gsmDetails, + this.gdsControlNodeDetails, + this.dbBackupConfig, + this.autoResourceManagementConfig, + this.gsmSshPublicKey, + this.vcnNsgIds, + this.metadata, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabase model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("shardingMethod")) { + this.shardingMethod(model.getShardingMethod()); + } + if (model.wasPropertyExplicitlySet("replicationMethod")) { + this.replicationMethod(model.getReplicationMethod()); + } + if (model.wasPropertyExplicitlySet("dbDeploymentType")) { + this.dbDeploymentType(model.getDbDeploymentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("connectionStrings")) { + this.connectionStrings(model.getConnectionStrings()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("latestGsmImageDetails")) { + this.latestGsmImageDetails(model.getLatestGsmImageDetails()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("scanListenerPort")) { + this.scanListenerPort(model.getScanListenerPort()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("compositeRaftShardSpaces")) { + this.compositeRaftShardSpaces(model.getCompositeRaftShardSpaces()); + } + if (model.wasPropertyExplicitlySet("compositeDataGuardShardSpaces")) { + this.compositeDataGuardShardSpaces(model.getCompositeDataGuardShardSpaces()); + } + if (model.wasPropertyExplicitlySet("systemRaftClusters")) { + this.systemRaftClusters(model.getSystemRaftClusters()); + } + if (model.wasPropertyExplicitlySet("systemDataGuardDatabases")) { + this.systemDataGuardDatabases(model.getSystemDataGuardDatabases()); + } + if (model.wasPropertyExplicitlySet("userShardSpaces")) { + this.userShardSpaces(model.getUserShardSpaces()); + } + if (model.wasPropertyExplicitlySet("catalogDetails")) { + this.catalogDetails(model.getCatalogDetails()); + } + if (model.wasPropertyExplicitlySet("gsmDetails")) { + this.gsmDetails(model.getGsmDetails()); + } + if (model.wasPropertyExplicitlySet("gdsControlNodeDetails")) { + this.gdsControlNodeDetails(model.getGdsControlNodeDetails()); + } + if (model.wasPropertyExplicitlySet("dbBackupConfig")) { + this.dbBackupConfig(model.getDbBackupConfig()); + } + if (model.wasPropertyExplicitlySet("autoResourceManagementConfig")) { + this.autoResourceManagementConfig(model.getAutoResourceManagementConfig()); + } + if (model.wasPropertyExplicitlySet("gsmSshPublicKey")) { + this.gsmSshPublicKey(model.getGsmSshPublicKey()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Lifecycle states for the Globally distributed database. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + + /** + * 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; + } + }; + /** + * Lifecycle states for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * Lifecycle states for the Globally distributed database. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Sharding methods for the Globally distributed database. + **/ + public enum ShardingMethod { + User("USER"), + System("SYSTEM"), + Composite("COMPOSITE"), + + /** + * 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(ShardingMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShardingMethod v : ShardingMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ShardingMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShardingMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ShardingMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Sharding methods for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private final ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed database. + * @return the value + **/ + public ShardingMethod getShardingMethod() { + return shardingMethod; + } + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + public enum ReplicationMethod { + Raft("RAFT"), + Dg("DG"), + + /** + * 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(ReplicationMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ReplicationMethod v : ReplicationMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ReplicationMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ReplicationMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ReplicationMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private final ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @return the value + **/ + public ReplicationMethod getReplicationMethod() { + return replicationMethod; + } + + /** + * The distributed database deployment type. + * + **/ + public enum DbDeploymentType { + Exadb("EXADB"), + + /** + * 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(DbDeploymentType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbDeploymentType v : DbDeploymentType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DbDeploymentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbDeploymentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DbDeploymentType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The distributed database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private final DbDeploymentType dbDeploymentType; + + /** + * The distributed database deployment type. + * + * @return the value + **/ + public DbDeploymentType getDbDeploymentType() { + return dbDeploymentType; + } + + /** + * The lifecycleDetails for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed database. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + private final DistributedDbConnectionString connectionStrings; + + public DistributedDbConnectionString getConnectionStrings() { + return connectionStrings; + } + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("latestGsmImageDetails") + private final DistributedDbGsmImage latestGsmImageDetails; + + public DistributedDbGsmImage getLatestGsmImageDetails() { + return latestGsmImageDetails; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The Global service manager listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The Global service manager listener port number for the Globally distributed database. + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for Globally distributed database. + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * Ons local port number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * Ons local port number. + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * Ons remote port number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * Ons remote port number. + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * The TCP SCAN listener port for database clusters with source type XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPort") + private final Integer scanListenerPort; + + /** + * The TCP SCAN listener port for database clusters with source type XS_NEW_VAULT_AND_CLUSTER or XS_NEW_CLUSTER. + * @return the value + **/ + public Integer getScanListenerPort() { + return scanListenerPort; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + /** + * Collection of composite raft shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeRaftShardSpaces") + private final java.util.List compositeRaftShardSpaces; + + /** + * Collection of composite raft shards. + * @return the value + **/ + public java.util.List getCompositeRaftShardSpaces() { + return compositeRaftShardSpaces; + } + + /** + * Collection of composite data guard shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compositeDataGuardShardSpaces") + private final java.util.List compositeDataGuardShardSpaces; + + /** + * Collection of composite data guard shard spaces. + * @return the value + **/ + public java.util.List getCompositeDataGuardShardSpaces() { + return compositeDataGuardShardSpaces; + } + + /** + * Collection of system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftClusters") + private final java.util.List systemRaftClusters; + + /** + * Collection of system raft clusters. + * @return the value + **/ + public java.util.List getSystemRaftClusters() { + return systemRaftClusters; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemDataGuardDatabases") + private final SystemDataGuardDatabase systemDataGuardDatabases; + + public SystemDataGuardDatabase getSystemDataGuardDatabases() { + return systemDataGuardDatabases; + } + + /** + * Collection of user defined shard spaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userShardSpaces") + private final java.util.List userShardSpaces; + + /** + * Collection of user defined shard spaces. + * @return the value + **/ + public java.util.List getUserShardSpaces() { + return userShardSpaces; + } + + /** + * Catalog details associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("catalogDetails") + private final java.util.List catalogDetails; + + /** + * Catalog details associated with the distributed database. + * @return the value + **/ + public java.util.List getCatalogDetails() { + return catalogDetails; + } + + /** + * Global Service Manager (GSM) instances associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmDetails") + private final java.util.List gsmDetails; + + /** + * Global Service Manager (GSM) instances associated with the distributed database. + * @return the value + **/ + public java.util.List getGsmDetails() { + return gsmDetails; + } + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeDetails") + private final java.util.List gdsControlNodeDetails; + + /** + * Global Database Services Control(GDS CTL) instances associated with the distributed database. + * @return the value + **/ + public java.util.List getGdsControlNodeDetails() { + return gdsControlNodeDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private final DistributedDbBackupConfig dbBackupConfig; + + public DistributedDbBackupConfig getDbBackupConfig() { + return dbBackupConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private final AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public AutoResourceManagementConfigurationDetails getAutoResourceManagementConfig() { + return autoResourceManagementConfig; + } + + /** + * The SSH public key for Global service manager instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gsmSshPublicKey") + private final String gsmSshPublicKey; + + /** + * The SSH public key for Global service manager instances. + * @return the value + **/ + public String getGsmSshPublicKey() { + return gsmSshPublicKey; + } + + /** + * The list of network security group (NSG) details associated with the distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the distributed database. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata getMetadata() { + return metadata; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedDatabase("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", shardingMethod=").append(String.valueOf(this.shardingMethod)); + sb.append(", replicationMethod=").append(String.valueOf(this.replicationMethod)); + sb.append(", dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", connectionStrings=").append(String.valueOf(this.connectionStrings)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", latestGsmImageDetails=").append(String.valueOf(this.latestGsmImageDetails)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", scanListenerPort=").append(String.valueOf(this.scanListenerPort)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", compositeRaftShardSpaces=") + .append(String.valueOf(this.compositeRaftShardSpaces)); + sb.append(", compositeDataGuardShardSpaces=") + .append(String.valueOf(this.compositeDataGuardShardSpaces)); + sb.append(", systemRaftClusters=").append(String.valueOf(this.systemRaftClusters)); + sb.append(", systemDataGuardDatabases=") + .append(String.valueOf(this.systemDataGuardDatabases)); + sb.append(", userShardSpaces=").append(String.valueOf(this.userShardSpaces)); + sb.append(", catalogDetails=").append(String.valueOf(this.catalogDetails)); + sb.append(", gsmDetails=").append(String.valueOf(this.gsmDetails)); + sb.append(", gdsControlNodeDetails=").append(String.valueOf(this.gdsControlNodeDetails)); + sb.append(", dbBackupConfig=").append(String.valueOf(this.dbBackupConfig)); + sb.append(", autoResourceManagementConfig=") + .append(String.valueOf(this.autoResourceManagementConfig)); + sb.append(", gsmSshPublicKey=").append(String.valueOf(this.gsmSshPublicKey)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + 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 DistributedDatabase)) { + return false; + } + + DistributedDatabase other = (DistributedDatabase) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.shardingMethod, other.shardingMethod) + && java.util.Objects.equals(this.replicationMethod, other.replicationMethod) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.connectionStrings, other.connectionStrings) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.latestGsmImageDetails, other.latestGsmImageDetails) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.scanListenerPort, other.scanListenerPort) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals( + this.compositeRaftShardSpaces, other.compositeRaftShardSpaces) + && java.util.Objects.equals( + this.compositeDataGuardShardSpaces, other.compositeDataGuardShardSpaces) + && java.util.Objects.equals(this.systemRaftClusters, other.systemRaftClusters) + && java.util.Objects.equals( + this.systemDataGuardDatabases, other.systemDataGuardDatabases) + && java.util.Objects.equals(this.userShardSpaces, other.userShardSpaces) + && java.util.Objects.equals(this.catalogDetails, other.catalogDetails) + && java.util.Objects.equals(this.gsmDetails, other.gsmDetails) + && java.util.Objects.equals(this.gdsControlNodeDetails, other.gdsControlNodeDetails) + && java.util.Objects.equals(this.dbBackupConfig, other.dbBackupConfig) + && java.util.Objects.equals( + this.autoResourceManagementConfig, other.autoResourceManagementConfig) + && java.util.Objects.equals(this.gsmSshPublicKey, other.gsmSshPublicKey) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && java.util.Objects.equals(this.metadata, other.metadata) + && 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.displayName == null ? 43 : this.displayName.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.databaseVersion == null ? 43 : this.databaseVersion.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.shardingMethod == null ? 43 : this.shardingMethod.hashCode()); + result = + (result * PRIME) + + (this.replicationMethod == null ? 43 : this.replicationMethod.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionStrings == null ? 43 : this.connectionStrings.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = + (result * PRIME) + + (this.latestGsmImageDetails == null + ? 43 + : this.latestGsmImageDetails.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPort == null ? 43 : this.scanListenerPort.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = + (result * PRIME) + + (this.compositeRaftShardSpaces == null + ? 43 + : this.compositeRaftShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.compositeDataGuardShardSpaces == null + ? 43 + : this.compositeDataGuardShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.systemRaftClusters == null + ? 43 + : this.systemRaftClusters.hashCode()); + result = + (result * PRIME) + + (this.systemDataGuardDatabases == null + ? 43 + : this.systemDataGuardDatabases.hashCode()); + result = + (result * PRIME) + + (this.userShardSpaces == null ? 43 : this.userShardSpaces.hashCode()); + result = + (result * PRIME) + + (this.catalogDetails == null ? 43 : this.catalogDetails.hashCode()); + result = (result * PRIME) + (this.gsmDetails == null ? 43 : this.gsmDetails.hashCode()); + result = + (result * PRIME) + + (this.gdsControlNodeDetails == null + ? 43 + : this.gdsControlNodeDetails.hashCode()); + result = + (result * PRIME) + + (this.dbBackupConfig == null ? 43 : this.dbBackupConfig.hashCode()); + result = + (result * PRIME) + + (this.autoResourceManagementConfig == null + ? 43 + : this.autoResourceManagementConfig.hashCode()); + result = + (result * PRIME) + + (this.gsmSshPublicKey == null ? 43 : this.gsmSshPublicKey.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseAutoResourceManagementDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseAutoResourceManagementDetails.java new file mode 100644 index 0000000000..3294e9a155 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseAutoResourceManagementDetails.java @@ -0,0 +1,577 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * AutoResourceManagement configuration details for the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseAutoResourceManagementDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseAutoResourceManagementDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEnabled", + "coolOffPeriodInMinutes", + "maxMoveRuAttempts", + "maxMoveRuUnit", + "mode", + "actionType", + "notificationTopicIds", + "streamIds" + }) + public DistributedDatabaseAutoResourceManagementDetails( + Boolean isEnabled, + Integer coolOffPeriodInMinutes, + Integer maxMoveRuAttempts, + MaxMoveRuUnit maxMoveRuUnit, + Mode mode, + ActionType actionType, + java.util.List notificationTopicIds, + java.util.List streamIds) { + super(); + this.isEnabled = isEnabled; + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.maxMoveRuUnit = maxMoveRuUnit; + this.mode = mode; + this.actionType = actionType; + this.notificationTopicIds = notificationTopicIds; + this.streamIds = streamIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @param coolOffPeriodInMinutes the value to set + * @return this builder + **/ + public Builder coolOffPeriodInMinutes(Integer coolOffPeriodInMinutes) { + this.coolOffPeriodInMinutes = coolOffPeriodInMinutes; + this.__explicitlySet__.add("coolOffPeriodInMinutes"); + return this; + } + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @param maxMoveRuAttempts the value to set + * @return this builder + **/ + public Builder maxMoveRuAttempts(Integer maxMoveRuAttempts) { + this.maxMoveRuAttempts = maxMoveRuAttempts; + this.__explicitlySet__.add("maxMoveRuAttempts"); + return this; + } + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @param maxMoveRuUnit the value to set + * @return this builder + **/ + public Builder maxMoveRuUnit(MaxMoveRuUnit maxMoveRuUnit) { + this.maxMoveRuUnit = maxMoveRuUnit; + this.__explicitlySet__.add("maxMoveRuUnit"); + return this; + } + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @param mode the value to set + * @return this builder + **/ + public Builder mode(Mode mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @param streamIds the value to set + * @return this builder + **/ + public Builder streamIds(java.util.List streamIds) { + this.streamIds = streamIds; + this.__explicitlySet__.add("streamIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseAutoResourceManagementDetails build() { + DistributedDatabaseAutoResourceManagementDetails model = + new DistributedDatabaseAutoResourceManagementDetails( + this.isEnabled, + this.coolOffPeriodInMinutes, + this.maxMoveRuAttempts, + this.maxMoveRuUnit, + this.mode, + this.actionType, + this.notificationTopicIds, + this.streamIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseAutoResourceManagementDetails model) { + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + if (model.wasPropertyExplicitlySet("coolOffPeriodInMinutes")) { + this.coolOffPeriodInMinutes(model.getCoolOffPeriodInMinutes()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuAttempts")) { + this.maxMoveRuAttempts(model.getMaxMoveRuAttempts()); + } + if (model.wasPropertyExplicitlySet("maxMoveRuUnit")) { + this.maxMoveRuUnit(model.getMaxMoveRuUnit()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("streamIds")) { + this.streamIds(model.getStreamIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * Flag indicating if autoResourceManagement is enabled or disabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("coolOffPeriodInMinutes") + private final Integer coolOffPeriodInMinutes; + + /** + * Time period to wait for the database to get stable after autoResourceManagement event. + * @return the value + **/ + public Integer getCoolOffPeriodInMinutes() { + return coolOffPeriodInMinutes; + } + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuAttempts") + private final Integer maxMoveRuAttempts; + + /** + * Maximum number of move replication unit attempts allowed within the configured period per database. + * @return the value + **/ + public Integer getMaxMoveRuAttempts() { + return maxMoveRuAttempts; + } + + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + public enum MaxMoveRuUnit { + Hour("HOUR"), + Day("DAY"), + + /** + * 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(MaxMoveRuUnit.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaxMoveRuUnit v : MaxMoveRuUnit.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaxMoveRuUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaxMoveRuUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaxMoveRuUnit', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Time unit applicable to maxMoveRuAttempts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxMoveRuUnit") + private final MaxMoveRuUnit maxMoveRuUnit; + + /** + * Time unit applicable to maxMoveRuAttempts. + * @return the value + **/ + public MaxMoveRuUnit getMaxMoveRuUnit() { + return maxMoveRuUnit; + } + + /** + * Mode of autoResourceManagement execution. + **/ + public enum Mode { + Automatic("AUTOMATIC"), + Recommendation("RECOMMENDATION"), + + /** + * 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(Mode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Mode v : Mode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Mode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Mode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Mode', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Mode of autoResourceManagement execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final Mode mode; + + /** + * Mode of autoResourceManagement execution. + * @return the value + **/ + public Mode getMode() { + return mode; + } + + /** + * The action that will be taken when autoResourceManagement is triggered. + **/ + public enum ActionType { + Move("MOVE"), + + /** + * 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 action that will be taken when autoResourceManagement is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action that will be taken when autoResourceManagement is triggered. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The list of notification topic ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to receive autoResourceManagement events. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamIds") + private final java.util.List streamIds; + + /** + * The list of stream ids [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that receive shard-related telemetry. + * @return the value + **/ + public java.util.List getStreamIds() { + return streamIds; + } + + @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("DistributedDatabaseAutoResourceManagementDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", coolOffPeriodInMinutes=").append(String.valueOf(this.coolOffPeriodInMinutes)); + sb.append(", maxMoveRuAttempts=").append(String.valueOf(this.maxMoveRuAttempts)); + sb.append(", maxMoveRuUnit=").append(String.valueOf(this.maxMoveRuUnit)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", streamIds=").append(String.valueOf(this.streamIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseAutoResourceManagementDetails)) { + return false; + } + + DistributedDatabaseAutoResourceManagementDetails other = + (DistributedDatabaseAutoResourceManagementDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals( + this.coolOffPeriodInMinutes, other.coolOffPeriodInMinutes) + && java.util.Objects.equals(this.maxMoveRuAttempts, other.maxMoveRuAttempts) + && java.util.Objects.equals(this.maxMoveRuUnit, other.maxMoveRuUnit) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.streamIds, other.streamIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = + (result * PRIME) + + (this.coolOffPeriodInMinutes == null + ? 43 + : this.coolOffPeriodInMinutes.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuAttempts == null ? 43 : this.maxMoveRuAttempts.hashCode()); + result = + (result * PRIME) + + (this.maxMoveRuUnit == null ? 43 : this.maxMoveRuUnit.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.streamIds == null ? 43 : this.streamIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalog.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalog.java new file mode 100644 index 0000000000..08c7c25d00 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalog.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a Globally distributed database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalog.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalog + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public DistributedDatabaseCatalog( + DistributedDatabaseCatalogReplicaDetails originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private DistributedDatabaseCatalogReplicaDetails originalReplica; + + public Builder originalReplica(DistributedDatabaseCatalogReplicaDetails originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replicas for the catalog. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas( + java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalog build() { + DistributedDatabaseCatalog model = + new DistributedDatabaseCatalog(this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalog model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final DistributedDatabaseCatalogReplicaDetails originalReplica; + + public DistributedDatabaseCatalogReplicaDetails getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replicas for the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replicas for the catalog. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("DistributedDatabaseCatalog("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalog)) { + return false; + } + + DistributedDatabaseCatalog other = (DistributedDatabaseCatalog) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabase.java new file mode 100644 index 0000000000..c195762791 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabase.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = DistributedDatabaseCatalogDatabase.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster.class, + name = "XS_NEW_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseCatalogDatabaseWithExadbXd.class, + name = "XD_EXISTING_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster.class, + name = "XS_NEW_VAULT_AND_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseCatalogDatabaseWithDbHome.class, + name = "EXISTING_DB_HOME" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseCatalogDatabaseWithExadbXs.class, + name = "XS_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DistributedDatabaseCatalogDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "timeCreated", "timeUpdated", "metadata"}) + protected DistributedDatabaseCatalogDatabase( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata) { + super(); + this.name = name; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.metadata = metadata; + } + + /** + * The name of the catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The time the catalog was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the catalog was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the catalog was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the catalog was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata 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("DistributedDatabaseCatalogDatabase("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + 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 DistributedDatabaseCatalogDatabase)) { + return false; + } + + DistributedDatabaseCatalogDatabase other = (DistributedDatabaseCatalogDatabase) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && 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.name == null ? 43 : this.name.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.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed database type. + * Use XS_EXISTING_CLUSTER for a database on Exascale Infrastructure that uses a pre-existing cluster. + * Use XS_NEW_CLUSTER for a database on Exascale Infrastructure that requires a new cluster created from scratch. + * Use XS_NEW_VAULT_AND_CLUSTER for a database on Exascale Infrastructure that requires a new vault and cluster created from scratch. + * Use XD_EXISTING_CLUSTER for a database on Dedicated Infrastructure that uses a pre-existing cluster. + * Use EXISTING_DB_HOME for a database on a pre-existing database home. + * + **/ + public enum Source { + XsExistingCluster("XS_EXISTING_CLUSTER"), + XsNewCluster("XS_NEW_CLUSTER"), + XsNewVaultAndCluster("XS_NEW_VAULT_AND_CLUSTER"), + XdExistingCluster("XD_EXISTING_CLUSTER"), + ExistingDbHome("EXISTING_DB_HOME"), + + /** + * 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(Source.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Source', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithDbHome.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithDbHome.java new file mode 100644 index 0000000000..f0633a4c90 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithDbHome.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog using a pre-existing Database Home. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogDatabaseWithDbHome.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogDatabaseWithDbHome + extends DistributedDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogDatabaseWithDbHome build() { + DistributedDatabaseCatalogDatabaseWithDbHome model = + new DistributedDatabaseCatalogDatabaseWithDbHome( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogDatabaseWithDbHome model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseCatalogDatabaseWithDbHome( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of the distributed database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseCatalogDatabaseWithDbHome("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogDatabaseWithDbHome)) { + return false; + } + + DistributedDatabaseCatalogDatabaseWithDbHome other = + (DistributedDatabaseCatalogDatabaseWithDbHome) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXd.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXd.java new file mode 100644 index 0000000000..c3a2c4a7c2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXd.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog running on ExaDB-D. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogDatabaseWithExadbXd.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogDatabaseWithExadbXd + extends DistributedDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogDatabaseWithExadbXd build() { + DistributedDatabaseCatalogDatabaseWithExadbXd model = + new DistributedDatabaseCatalogDatabaseWithExadbXd( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogDatabaseWithExadbXd model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseCatalogDatabaseWithExadbXd( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of the distributed database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseCatalogDatabaseWithExadbXd("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogDatabaseWithExadbXd)) { + return false; + } + + DistributedDatabaseCatalogDatabaseWithExadbXd other = + (DistributedDatabaseCatalogDatabaseWithExadbXd) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXs.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXs.java new file mode 100644 index 0000000000..821f75b544 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXs.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog running on ExaDB-XS. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogDatabaseWithExadbXs.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogDatabaseWithExadbXs + extends DistributedDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogDatabaseWithExadbXs build() { + DistributedDatabaseCatalogDatabaseWithExadbXs model = + new DistributedDatabaseCatalogDatabaseWithExadbXs( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogDatabaseWithExadbXs model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseCatalogDatabaseWithExadbXs( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of the distributed database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseCatalogDatabaseWithExadbXs("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogDatabaseWithExadbXs)) { + return false; + } + + DistributedDatabaseCatalogDatabaseWithExadbXs other = + (DistributedDatabaseCatalogDatabaseWithExadbXs) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster.java new file mode 100644 index 0000000000..68432fcd9a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster.java @@ -0,0 +1,709 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog on ExaDB-XS with a new cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster + extends DistributedDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private DistributedDbVmCluster vmClusterDetails; + + public Builder vmClusterDetails(DistributedDbVmCluster vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster build() { + DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster model = + new DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.availabilityDomain, + this.exascaleDbStorageVaultId, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String availabilityDomain, + String exascaleDbStorageVaultId, + DistributedDbVmCluster vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * Status of the distributed database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final DistributedDbVmCluster vmClusterDetails; + + public DistributedDbVmCluster getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster)) { + return false; + } + + DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster other = + (DistributedDatabaseCatalogDatabaseWithExadbXsNewCluster) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster.java new file mode 100644 index 0000000000..86ba519367 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster.java @@ -0,0 +1,693 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database catalog on ExaDB-XS with a new cluster and storage vault. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster + extends DistributedDatabaseCatalogDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the distributed database catalog. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private DistributedDbStorageVault dbStorageVaultDetails; + + public Builder dbStorageVaultDetails(DistributedDbStorageVault dbStorageVaultDetails) { + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.__explicitlySet__.add("dbStorageVaultDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private DistributedDbVmCluster vmClusterDetails; + + public Builder vmClusterDetails(DistributedDbVmCluster vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster build() { + DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster model = + new DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.availabilityDomain, + this.dbStorageVaultDetails, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("dbStorageVaultDetails")) { + this.dbStorageVaultDetails(model.getDbStorageVaultDetails()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String availabilityDomain, + DistributedDbStorageVault dbStorageVaultDetails, + DistributedDbVmCluster vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * Status of the distributed database catalog. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the distributed database catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the distributed database catalog. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The name of the availability domain that the distributed database catalog will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database catalog will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private final DistributedDbStorageVault dbStorageVaultDetails; + + public DistributedDbStorageVault getDbStorageVaultDetails() { + return dbStorageVaultDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final DistributedDbVmCluster vmClusterDetails; + + public DistributedDbVmCluster getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", dbStorageVaultDetails=").append(String.valueOf(this.dbStorageVaultDetails)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster)) { + return false; + } + + DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster other = + (DistributedDatabaseCatalogDatabaseWithExadbXsNewVaultAndCluster) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.dbStorageVaultDetails, other.dbStorageVaultDetails) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.dbStorageVaultDetails == null + ? 43 + : this.dbStorageVaultDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogReplicaDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogReplicaDetails.java new file mode 100644 index 0000000000..691e753ba7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCatalogReplicaDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a catalog replica. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCatalogReplicaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCatalogReplicaDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public DistributedDatabaseCatalogReplicaDetails( + String name, DistributedDatabaseCatalogDatabase database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private DistributedDatabaseCatalogDatabase database; + + public Builder database(DistributedDatabaseCatalogDatabase database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseCatalogReplicaDetails build() { + DistributedDatabaseCatalogReplicaDetails model = + new DistributedDatabaseCatalogReplicaDetails(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCatalogReplicaDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the catalog replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final DistributedDatabaseCatalogDatabase database; + + public DistributedDatabaseCatalogDatabase getDatabase() { + return database; + } + + @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("DistributedDatabaseCatalogReplicaDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseCatalogReplicaDetails)) { + return false; + } + + DistributedDatabaseCatalogReplicaDetails other = + (DistributedDatabaseCatalogReplicaDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCollection.java new file mode 100644 index 0000000000..36e85fbaa6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Collection of Globally distributed databases. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DistributedDatabaseCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Array of Globally distributed database summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Array of Globally distributed database summaries. + * @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 DistributedDatabaseCollection build() { + DistributedDatabaseCollection model = new DistributedDatabaseCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseCollection 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); + } + + /** + * Array of Globally distributed database summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Array of Globally distributed database summaries. + * @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("DistributedDatabaseCollection("); + 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 DistributedDatabaseCollection)) { + return false; + } + + DistributedDatabaseCollection other = (DistributedDatabaseCollection) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGdsControlNode.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGdsControlNode.java new file mode 100644 index 0000000000..a9bf0a2ab1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGdsControlNode.java @@ -0,0 +1,452 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of Global Database Services Control(GDS CTL) instances for the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseGdsControlNode.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseGdsControlNode + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "subnetId", + "availabilityDomain", + "timeCreated", + "timeUpdated", + "supportingResourceId", + "privateIp", + "gdsControlNodeImageDetails", + "metadata" + }) + public DistributedDatabaseGdsControlNode( + String name, + String subnetId, + String availabilityDomain, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String supportingResourceId, + String privateIp, + DistributedDbGdsControlNodeImage gdsControlNodeImageDetails, + DistributedDbMetadata metadata) { + super(); + this.name = name; + this.subnetId = subnetId; + this.availabilityDomain = availabilityDomain; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.supportingResourceId = supportingResourceId; + this.privateIp = privateIp; + this.gdsControlNodeImageDetails = gdsControlNodeImageDetails; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the Global Database Services Control instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the Global Database Services Control instance + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + * @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 time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + * @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 identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * The identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * IP address of the Global Database Services Control instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private String privateIp; + + /** + * IP address of the Global Database Services Control instance. + * @param privateIp the value to set + * @return this builder + **/ + public Builder privateIp(String privateIp) { + this.privateIp = privateIp; + this.__explicitlySet__.add("privateIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeImageDetails") + private DistributedDbGdsControlNodeImage gdsControlNodeImageDetails; + + public Builder gdsControlNodeImageDetails( + DistributedDbGdsControlNodeImage gdsControlNodeImageDetails) { + this.gdsControlNodeImageDetails = gdsControlNodeImageDetails; + this.__explicitlySet__.add("gdsControlNodeImageDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata 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 DistributedDatabaseGdsControlNode build() { + DistributedDatabaseGdsControlNode model = + new DistributedDatabaseGdsControlNode( + this.name, + this.subnetId, + this.availabilityDomain, + this.timeCreated, + this.timeUpdated, + this.supportingResourceId, + this.privateIp, + this.gdsControlNodeImageDetails, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseGdsControlNode model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("privateIp")) { + this.privateIp(model.getPrivateIp()); + } + if (model.wasPropertyExplicitlySet("gdsControlNodeImageDetails")) { + this.gdsControlNodeImageDetails(model.getGdsControlNodeImageDetails()); + } + 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); + } + + /** + * Name of the Global Database Services Control instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the Global Database Services Control instance + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Global Database Services Control instance. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain where the Global Database Services Control instance is located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Global Database Services Control instance was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Global Database Services Control instance was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * The identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * IP address of the Global Database Services Control instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private final String privateIp; + + /** + * IP address of the Global Database Services Control instance. + * @return the value + **/ + public String getPrivateIp() { + return privateIp; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gdsControlNodeImageDetails") + private final DistributedDbGdsControlNodeImage gdsControlNodeImageDetails; + + public DistributedDbGdsControlNodeImage getGdsControlNodeImageDetails() { + return gdsControlNodeImageDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata 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("DistributedDatabaseGdsControlNode("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", gdsControlNodeImageDetails=") + .append(String.valueOf(this.gdsControlNodeImageDetails)); + 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 DistributedDatabaseGdsControlNode)) { + return false; + } + + DistributedDatabaseGdsControlNode other = (DistributedDatabaseGdsControlNode) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals( + this.gdsControlNodeImageDetails, other.gdsControlNodeImageDetails) + && 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.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.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.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.gdsControlNodeImageDetails == null + ? 43 + : this.gdsControlNodeImageDetails.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGsm.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGsm.java new file mode 100644 index 0000000000..53da0f22a6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseGsm.java @@ -0,0 +1,543 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of global service manager(GSM also known as shard director) instances for the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseGsm.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseGsm + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "computeCount", + "dataStorageSizeInGbs", + "timeCreated", + "timeUpdated", + "status", + "timeSslCertificateExpires", + "supportingResourceId", + "gsmImageDetails", + "metadata" + }) + public DistributedDatabaseGsm( + String name, + Float computeCount, + Double dataStorageSizeInGbs, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Status status, + java.util.Date timeSslCertificateExpires, + String supportingResourceId, + DistributedDbGsmImage gsmImageDetails, + DistributedDbMetadata metadata) { + super(); + this.name = name; + this.computeCount = computeCount; + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.status = status; + this.timeSslCertificateExpires = timeSslCertificateExpires; + this.supportingResourceId = supportingResourceId; + this.gsmImageDetails = gsmImageDetails; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the Global service manager instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the Global service manager instance + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The compute count for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + /** + * The compute count for the Global service manager instance. + * @param computeCount the value to set + * @return this builder + **/ + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + * @param dataStorageSizeInGbs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGbs(Double dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + this.__explicitlySet__.add("dataStorageSizeInGbs"); + return this; + } + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + * @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 time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + * @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; + } + /** + * Status of the gsm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the gsm. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeSslCertificateExpires") + private java.util.Date timeSslCertificateExpires; + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string + * @param timeSslCertificateExpires the value to set + * @return this builder + **/ + public Builder timeSslCertificateExpires(java.util.Date timeSslCertificateExpires) { + this.timeSslCertificateExpires = timeSslCertificateExpires; + this.__explicitlySet__.add("timeSslCertificateExpires"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gsmImageDetails") + private DistributedDbGsmImage gsmImageDetails; + + public Builder gsmImageDetails(DistributedDbGsmImage gsmImageDetails) { + this.gsmImageDetails = gsmImageDetails; + this.__explicitlySet__.add("gsmImageDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata 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 DistributedDatabaseGsm build() { + DistributedDatabaseGsm model = + new DistributedDatabaseGsm( + this.name, + this.computeCount, + this.dataStorageSizeInGbs, + this.timeCreated, + this.timeUpdated, + this.status, + this.timeSslCertificateExpires, + this.supportingResourceId, + this.gsmImageDetails, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseGsm model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGbs")) { + this.dataStorageSizeInGbs(model.getDataStorageSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeSslCertificateExpires")) { + this.timeSslCertificateExpires(model.getTimeSslCertificateExpires()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("gsmImageDetails")) { + this.gsmImageDetails(model.getGsmImageDetails()); + } + 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); + } + + /** + * Name of the Global service manager instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the Global service manager instance + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The compute count for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private final Float computeCount; + + /** + * The compute count for the Global service manager instance. + * @return the value + **/ + public Float getComputeCount() { + return computeCount; + } + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGbs") + private final Double dataStorageSizeInGbs; + + /** + * The data disk group size to be allocated in GBs for the Global service manager instance. + * @return the value + **/ + public Double getDataStorageSizeInGbs() { + return dataStorageSizeInGbs; + } + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Global service manager instance was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Global service manager instance was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Status of the gsm. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the gsm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the gsm. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeSslCertificateExpires") + private final java.util.Date timeSslCertificateExpires; + + /** + * The time the ssl certificate associated with Global service manager expires. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeSslCertificateExpires() { + return timeSslCertificateExpires; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("gsmImageDetails") + private final DistributedDbGsmImage gsmImageDetails; + + public DistributedDbGsmImage getGsmImageDetails() { + return gsmImageDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata 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("DistributedDatabaseGsm("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", computeCount=").append(String.valueOf(this.computeCount)); + sb.append(", dataStorageSizeInGbs=").append(String.valueOf(this.dataStorageSizeInGbs)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeSslCertificateExpires=") + .append(String.valueOf(this.timeSslCertificateExpires)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", gsmImageDetails=").append(String.valueOf(this.gsmImageDetails)); + 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 DistributedDatabaseGsm)) { + return false; + } + + DistributedDatabaseGsm other = (DistributedDatabaseGsm) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.computeCount, other.computeCount) + && java.util.Objects.equals(this.dataStorageSizeInGbs, other.dataStorageSizeInGbs) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals( + this.timeSslCertificateExpires, other.timeSslCertificateExpires) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.gsmImageDetails, other.gsmImageDetails) + && 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.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.computeCount == null ? 43 : this.computeCount.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGbs == null + ? 43 + : this.dataStorageSizeInGbs.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.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.timeSslCertificateExpires == null + ? 43 + : this.timeSslCertificateExpires.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.gsmImageDetails == null ? 43 : this.gsmImageDetails.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpoint.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpoint.java new file mode 100644 index 0000000000..8c87d9292f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpoint.java @@ -0,0 +1,830 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * DistributedDatabasePrivateEndpoint resource. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabasePrivateEndpoint.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabasePrivateEndpoint + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "subnetId", + "vcnId", + "displayName", + "description", + "privateIp", + "vcnNsgIds", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "proxyComputeInstanceId", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedDatabasePrivateEndpoint( + String id, + String compartmentId, + String subnetId, + String vcnId, + String displayName, + String description, + String privateIp, + java.util.List vcnNsgIds, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String proxyComputeInstanceId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.subnetId = subnetId; + this.vcnId = vcnId; + this.displayName = displayName; + this.description = description; + this.privateIp = privateIp; + this.vcnNsgIds = vcnNsgIds; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.proxyComputeInstanceId = proxyComputeInstanceId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The identifier of the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The identifier of the Private Endpoint. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Identifier of the compartment in which private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Identifier of the compartment in which private endpoint exists. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Identifier of the subnet in which private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * Identifier of the subnet in which private endpoint exists. + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * Identifier of the VCN in which subnet exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + /** + * Identifier of the VCN in which subnet exists. + * @param vcnId the value to set + * @return this builder + **/ + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + /** + * DistributedDatabasePrivateEndpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * DistributedDatabasePrivateEndpoint display name. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * IP address of the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private String privateIp; + + /** + * IP address of the Private Endpoint. + * @param privateIp the value to set + * @return this builder + **/ + public Builder privateIp(String privateIp) { + this.privateIp = privateIp; + this.__explicitlySet__.add("privateIp"); + return this; + } + /** + * The list of network security group (NSG) details associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the private endpoint. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + /** + * The time the DistributedDatabasePrivateEndpoint was first created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the DistributedDatabasePrivateEndpoint was first created. An RFC3339 formatted datetime string + * @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 time the Private Endpoint was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Private Endpoint was last updated. An RFC3339 formatted datetime string + * @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; + } + /** + * Lifecycle states for private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * Lifecycle states for private endpoint. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Detailed message for the lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Detailed message for the lifecycle 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 identifier of the proxy compute instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("proxyComputeInstanceId") + private String proxyComputeInstanceId; + + /** + * The identifier of the proxy compute instance. + * @param proxyComputeInstanceId the value to set + * @return this builder + **/ + public Builder proxyComputeInstanceId(String proxyComputeInstanceId) { + this.proxyComputeInstanceId = proxyComputeInstanceId; + this.__explicitlySet__.add("proxyComputeInstanceId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedDatabasePrivateEndpoint build() { + DistributedDatabasePrivateEndpoint model = + new DistributedDatabasePrivateEndpoint( + this.id, + this.compartmentId, + this.subnetId, + this.vcnId, + this.displayName, + this.description, + this.privateIp, + this.vcnNsgIds, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.proxyComputeInstanceId, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabasePrivateEndpoint model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("privateIp")) { + this.privateIp(model.getPrivateIp()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + 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("proxyComputeInstanceId")) { + this.proxyComputeInstanceId(model.getProxyComputeInstanceId()); + } + 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 identifier of the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The identifier of the Private Endpoint. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Identifier of the compartment in which private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Identifier of the compartment in which private endpoint exists. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Identifier of the subnet in which private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * Identifier of the subnet in which private endpoint exists. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * Identifier of the VCN in which subnet exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; + + /** + * Identifier of the VCN in which subnet exists. + * @return the value + **/ + public String getVcnId() { + return vcnId; + } + + /** + * DistributedDatabasePrivateEndpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * DistributedDatabasePrivateEndpoint display name. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * IP address of the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private final String privateIp; + + /** + * IP address of the Private Endpoint. + * @return the value + **/ + public String getPrivateIp() { + return privateIp; + } + + /** + * The list of network security group (NSG) details associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the private endpoint. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + /** + * The time the DistributedDatabasePrivateEndpoint was first created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the DistributedDatabasePrivateEndpoint was first created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Private Endpoint was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Private Endpoint was last updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Lifecycle states for private endpoint. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Failed("FAILED"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + + /** + * 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; + } + }; + /** + * Lifecycle states for private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * Lifecycle states for private endpoint. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Detailed message for the lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Detailed message for the lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The identifier of the proxy compute instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("proxyComputeInstanceId") + private final String proxyComputeInstanceId; + + /** + * The identifier of the proxy compute instance. + * @return the value + **/ + public String getProxyComputeInstanceId() { + return proxyComputeInstanceId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedDatabasePrivateEndpoint("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + 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(", proxyComputeInstanceId=").append(String.valueOf(this.proxyComputeInstanceId)); + 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 DistributedDatabasePrivateEndpoint)) { + return false; + } + + DistributedDatabasePrivateEndpoint other = (DistributedDatabasePrivateEndpoint) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && 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.proxyComputeInstanceId, other.proxyComputeInstanceId) + && 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.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.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.proxyComputeInstanceId == null + ? 43 + : this.proxyComputeInstanceId.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointCollection.java new file mode 100644 index 0000000000..138b29f598 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Collection of private endpoints. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabasePrivateEndpointCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabasePrivateEndpointCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DistributedDatabasePrivateEndpointCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Array of private endpoint summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Array of private endpoint summaries. + * @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 DistributedDatabasePrivateEndpointCollection build() { + DistributedDatabasePrivateEndpointCollection model = + new DistributedDatabasePrivateEndpointCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabasePrivateEndpointCollection 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); + } + + /** + * Array of private endpoint summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Array of private endpoint summaries. + * @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("DistributedDatabasePrivateEndpointCollection("); + 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 DistributedDatabasePrivateEndpointCollection)) { + return false; + } + + DistributedDatabasePrivateEndpointCollection other = + (DistributedDatabasePrivateEndpointCollection) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointSummary.java new file mode 100644 index 0000000000..87f6c1b20d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabasePrivateEndpointSummary.java @@ -0,0 +1,694 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * DistributedDatabasePrivateEndpoint resource summary. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabasePrivateEndpointSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabasePrivateEndpointSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "description", + "compartmentId", + "subnetId", + "vcnId", + "displayName", + "vcnNsgIds", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedDatabasePrivateEndpointSummary( + String id, + String description, + String compartmentId, + String subnetId, + String vcnId, + String displayName, + java.util.List vcnNsgIds, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDatabasePrivateEndpoint.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.description = description; + this.compartmentId = compartmentId; + this.subnetId = subnetId; + this.vcnId = vcnId; + this.displayName = displayName; + this.vcnNsgIds = vcnNsgIds; + 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 { + /** + * DistributedDatabasePrivateEndpoint identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * DistributedDatabasePrivateEndpoint identifier + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Identifier of the compartment where private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Identifier of the compartment where private endpoint exists. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Identifier of the customer subnet against which private endpoint is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * Identifier of the customer subnet against which private endpoint is created. + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * Identifier of the VCN in which subnet exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + /** + * Identifier of the VCN in which subnet exists. + * @param vcnId the value to set + * @return this builder + **/ + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + /** + * Private endpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Private endpoint display name. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The list of network security group (NSG) details associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the private endpoint. + * @param vcnNsgIds the value to set + * @return this builder + **/ + public Builder vcnNsgIds(java.util.List vcnNsgIds) { + this.vcnNsgIds = vcnNsgIds; + this.__explicitlySet__.add("vcnNsgIds"); + return this; + } + /** + * The time the the private endpoint was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the the private endpoint was created. An RFC3339 formatted datetime string + * @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 time the private endpoint was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the private endpoint was last updated. An RFC3339 formatted datetime string + * @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; + } + /** + * Lifecycle state of private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DistributedDatabasePrivateEndpoint.LifecycleState lifecycleState; + + /** + * Lifecycle state of private endpoint. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState( + DistributedDatabasePrivateEndpoint.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Detailed message for the lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Detailed message for the lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedDatabasePrivateEndpointSummary build() { + DistributedDatabasePrivateEndpointSummary model = + new DistributedDatabasePrivateEndpointSummary( + this.id, + this.description, + this.compartmentId, + this.subnetId, + this.vcnId, + this.displayName, + this.vcnNsgIds, + 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(DistributedDatabasePrivateEndpointSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("vcnNsgIds")) { + this.vcnNsgIds(model.getVcnNsgIds()); + } + 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); + } + + /** + * DistributedDatabasePrivateEndpoint identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * DistributedDatabasePrivateEndpoint identifier + * @return the value + **/ + public String getId() { + return id; + } + + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Identifier of the compartment where private endpoint exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Identifier of the compartment where private endpoint exists. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Identifier of the customer subnet against which private endpoint is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * Identifier of the customer subnet against which private endpoint is created. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * Identifier of the VCN in which subnet exists. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; + + /** + * Identifier of the VCN in which subnet exists. + * @return the value + **/ + public String getVcnId() { + return vcnId; + } + + /** + * Private endpoint display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Private endpoint display name. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The list of network security group (NSG) details associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnNsgIds") + private final java.util.List vcnNsgIds; + + /** + * The list of network security group (NSG) details associated with the private endpoint. + * @return the value + **/ + public java.util.List getVcnNsgIds() { + return vcnNsgIds; + } + + /** + * The time the the private endpoint was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the the private endpoint was created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the private endpoint was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the private endpoint was last updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Lifecycle state of private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DistributedDatabasePrivateEndpoint.LifecycleState lifecycleState; + + /** + * Lifecycle state of private endpoint. + * @return the value + **/ + public DistributedDatabasePrivateEndpoint.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Detailed message for the lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Detailed message for the lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedDatabasePrivateEndpointSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", vcnNsgIds=").append(String.valueOf(this.vcnNsgIds)); + 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 DistributedDatabasePrivateEndpointSummary)) { + return false; + } + + DistributedDatabasePrivateEndpointSummary other = + (DistributedDatabasePrivateEndpointSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.vcnNsgIds, other.vcnNsgIds) + && 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.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.vcnNsgIds == null ? 43 : this.vcnNsgIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRaftMetric.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRaftMetric.java new file mode 100644 index 0000000000..75938c0df9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRaftMetric.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Raft metrics for shards and catalog for the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseRaftMetric.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseRaftMetric + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"raftMetrics", "configTasks"}) + public DistributedDatabaseRaftMetric( + java.util.Map raftMetrics, java.util.Map configTasks) { + super(); + this.raftMetrics = raftMetrics; + this.configTasks = configTasks; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Raft metrics for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftMetrics") + private java.util.Map raftMetrics; + + /** + * Raft metrics for the Globally distributed database. + * @param raftMetrics the value to set + * @return this builder + **/ + public Builder raftMetrics(java.util.Map raftMetrics) { + this.raftMetrics = raftMetrics; + this.__explicitlySet__.add("raftMetrics"); + return this; + } + /** + * Details of in-progress configuration tasks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configTasks") + private java.util.Map configTasks; + + /** + * Details of in-progress configuration tasks. + * @param configTasks the value to set + * @return this builder + **/ + public Builder configTasks(java.util.Map configTasks) { + this.configTasks = configTasks; + this.__explicitlySet__.add("configTasks"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseRaftMetric build() { + DistributedDatabaseRaftMetric model = + new DistributedDatabaseRaftMetric(this.raftMetrics, this.configTasks); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseRaftMetric model) { + if (model.wasPropertyExplicitlySet("raftMetrics")) { + this.raftMetrics(model.getRaftMetrics()); + } + if (model.wasPropertyExplicitlySet("configTasks")) { + this.configTasks(model.getConfigTasks()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Raft metrics for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("raftMetrics") + private final java.util.Map raftMetrics; + + /** + * Raft metrics for the Globally distributed database. + * @return the value + **/ + public java.util.Map getRaftMetrics() { + return raftMetrics; + } + + /** + * Details of in-progress configuration tasks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configTasks") + private final java.util.Map configTasks; + + /** + * Details of in-progress configuration tasks. + * @return the value + **/ + public java.util.Map getConfigTasks() { + return configTasks; + } + + @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("DistributedDatabaseRaftMetric("); + sb.append("super=").append(super.toString()); + sb.append("raftMetrics=").append(String.valueOf(this.raftMetrics)); + sb.append(", configTasks=").append(String.valueOf(this.configTasks)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseRaftMetric)) { + return false; + } + + DistributedDatabaseRaftMetric other = (DistributedDatabaseRaftMetric) o; + return java.util.Objects.equals(this.raftMetrics, other.raftMetrics) + && java.util.Objects.equals(this.configTasks, other.configTasks) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.raftMetrics == null ? 43 : this.raftMetrics.hashCode()); + result = (result * PRIME) + (this.configTasks == null ? 43 : this.configTasks.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLog.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLog.java new file mode 100644 index 0000000000..14813359b7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLog.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Move RU invocation history for the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseRuChangeLog.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseRuChangeLog + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"ruChangeLog"}) + public DistributedDatabaseRuChangeLog( + java.util.List ruChangeLog) { + super(); + this.ruChangeLog = ruChangeLog; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Ordered list of move RU invocations (latest first). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruChangeLog") + private java.util.List ruChangeLog; + + /** + * Ordered list of move RU invocations (latest first). + * @param ruChangeLog the value to set + * @return this builder + **/ + public Builder ruChangeLog( + java.util.List ruChangeLog) { + this.ruChangeLog = ruChangeLog; + this.__explicitlySet__.add("ruChangeLog"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseRuChangeLog build() { + DistributedDatabaseRuChangeLog model = + new DistributedDatabaseRuChangeLog(this.ruChangeLog); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseRuChangeLog model) { + if (model.wasPropertyExplicitlySet("ruChangeLog")) { + this.ruChangeLog(model.getRuChangeLog()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Ordered list of move RU invocations (latest first). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruChangeLog") + private final java.util.List ruChangeLog; + + /** + * Ordered list of move RU invocations (latest first). + * @return the value + **/ + public java.util.List getRuChangeLog() { + return ruChangeLog; + } + + @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("DistributedDatabaseRuChangeLog("); + sb.append("super=").append(super.toString()); + sb.append("ruChangeLog=").append(String.valueOf(this.ruChangeLog)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseRuChangeLog)) { + return false; + } + + DistributedDatabaseRuChangeLog other = (DistributedDatabaseRuChangeLog) o; + return java.util.Objects.equals(this.ruChangeLog, other.ruChangeLog) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.ruChangeLog == null ? 43 : this.ruChangeLog.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLogSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLogSummary.java new file mode 100644 index 0000000000..29760c8894 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseRuChangeLogSummary.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * One move RU invocation record for the Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseRuChangeLogSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseRuChangeLogSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "sourceShardName", + "targetShardName", + "ruId", + "status", + "triggeredBy", + "timeCreated", + "timeUpdated" + }) + public DistributedDatabaseRuChangeLogSummary( + String sourceShardName, + String targetShardName, + String ruId, + Status status, + String triggeredBy, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.sourceShardName = sourceShardName; + this.targetShardName = targetShardName; + this.ruId = ruId; + this.status = status; + this.triggeredBy = triggeredBy; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Source shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private String sourceShardName; + + /** + * Source shard for move RU invocation. + * @param sourceShardName the value to set + * @return this builder + **/ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + this.__explicitlySet__.add("sourceShardName"); + return this; + } + /** + * Target shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetShardName") + private String targetShardName; + + /** + * Target shard for move RU invocation. + * @param targetShardName the value to set + * @return this builder + **/ + public Builder targetShardName(String targetShardName) { + this.targetShardName = targetShardName; + this.__explicitlySet__.add("targetShardName"); + return this; + } + /** + * Replication unit identifier associated with the invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruId") + private String ruId; + + /** + * Replication unit identifier associated with the invocation. + * @param ruId the value to set + * @return this builder + **/ + public Builder ruId(String ruId) { + this.ruId = ruId; + this.__explicitlySet__.add("ruId"); + return this; + } + /** + * Current or terminal status of the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Current or terminal status of the move RU invocation. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Actor who triggered the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("triggeredBy") + private String triggeredBy; + + /** + * Actor who triggered the move RU invocation. + * @param triggeredBy the value to set + * @return this builder + **/ + public Builder triggeredBy(String triggeredBy) { + this.triggeredBy = triggeredBy; + this.__explicitlySet__.add("triggeredBy"); + return this; + } + /** + * Entry creation timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Entry creation timestamp in UTC. + * @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; + } + /** + * Entry update timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Entry update timestamp in UTC. + * @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 DistributedDatabaseRuChangeLogSummary build() { + DistributedDatabaseRuChangeLogSummary model = + new DistributedDatabaseRuChangeLogSummary( + this.sourceShardName, + this.targetShardName, + this.ruId, + this.status, + this.triggeredBy, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseRuChangeLogSummary model) { + if (model.wasPropertyExplicitlySet("sourceShardName")) { + this.sourceShardName(model.getSourceShardName()); + } + if (model.wasPropertyExplicitlySet("targetShardName")) { + this.targetShardName(model.getTargetShardName()); + } + if (model.wasPropertyExplicitlySet("ruId")) { + this.ruId(model.getRuId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("triggeredBy")) { + this.triggeredBy(model.getTriggeredBy()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + 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); + } + + /** + * Source shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private final String sourceShardName; + + /** + * Source shard for move RU invocation. + * @return the value + **/ + public String getSourceShardName() { + return sourceShardName; + } + + /** + * Target shard for move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetShardName") + private final String targetShardName; + + /** + * Target shard for move RU invocation. + * @return the value + **/ + public String getTargetShardName() { + return targetShardName; + } + + /** + * Replication unit identifier associated with the invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruId") + private final String ruId; + + /** + * Replication unit identifier associated with the invocation. + * @return the value + **/ + public String getRuId() { + return ruId; + } + + /** + * Current or terminal status of the move RU invocation. + **/ + public enum Status { + Failed("FAILED"), + Queued("QUEUED"), + InProgress("IN_PROGRESS"), + Completed("COMPLETED"), + + /** + * 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Current or terminal status of the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Current or terminal status of the move RU invocation. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * Actor who triggered the move RU invocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("triggeredBy") + private final String triggeredBy; + + /** + * Actor who triggered the move RU invocation. + * @return the value + **/ + public String getTriggeredBy() { + return triggeredBy; + } + + /** + * Entry creation timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Entry creation timestamp in UTC. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Entry update timestamp in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Entry update timestamp in UTC. + * @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("DistributedDatabaseRuChangeLogSummary("); + sb.append("super=").append(super.toString()); + sb.append("sourceShardName=").append(String.valueOf(this.sourceShardName)); + sb.append(", targetShardName=").append(String.valueOf(this.targetShardName)); + sb.append(", ruId=").append(String.valueOf(this.ruId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", triggeredBy=").append(String.valueOf(this.triggeredBy)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + 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 DistributedDatabaseRuChangeLogSummary)) { + return false; + } + + DistributedDatabaseRuChangeLogSummary other = (DistributedDatabaseRuChangeLogSummary) o; + return java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.targetShardName, other.targetShardName) + && java.util.Objects.equals(this.ruId, other.ruId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.triggeredBy, other.triggeredBy) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && 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.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = + (result * PRIME) + + (this.targetShardName == null ? 43 : this.targetShardName.hashCode()); + result = (result * PRIME) + (this.ruId == null ? 43 : this.ruId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.triggeredBy == null ? 43 : this.triggeredBy.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabase.java new file mode 100644 index 0000000000..cfd25ac0e0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabase.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = DistributedDatabaseShardDatabase.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseShardDatabaseWithExadbXsNewCluster.class, + name = "XS_NEW_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster.class, + name = "XS_NEW_VAULT_AND_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseShardDatabaseWithExadbXd.class, + name = "XD_EXISTING_CLUSTER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseShardDatabaseWithDbHome.class, + name = "EXISTING_DB_HOME" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DistributedDatabaseShardDatabaseWithExadbXs.class, + name = "XS_EXISTING_CLUSTER" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DistributedDatabaseShardDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "timeCreated", "timeUpdated", "metadata"}) + protected DistributedDatabaseShardDatabase( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata) { + super(); + this.name = name; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.metadata = metadata; + } + + /** + * Name of the shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the shard. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The time the shard was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the shard was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the shard was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the shard was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata 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("DistributedDatabaseShardDatabase("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + 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 DistributedDatabaseShardDatabase)) { + return false; + } + + DistributedDatabaseShardDatabase other = (DistributedDatabaseShardDatabase) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && 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.name == null ? 43 : this.name.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.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The source of the Globally distributed database type. + * Use XS_EXISTING_CLUSTER for a database on Exascale Infrastructure that uses a pre-existing cluster. + * Use XS_NEW_CLUSTER for a database on Exascale Infrastructure that requires a new cluster created from scratch. + * Use XS_NEW_VAULT_AND_CLUSTER for a database on Exascale Infrastructure that requires a new vault and cluster created from scratch. + * Use XD_EXISTING_CLUSTER for a database on Dedicated Infrastructure that uses a pre-existing cluster. + * Use EXISTING_DB_HOME for a database on a pre-existing database home. + * + **/ + public enum Source { + XsExistingCluster("XS_EXISTING_CLUSTER"), + XsNewCluster("XS_NEW_CLUSTER"), + XsNewVaultAndCluster("XS_NEW_VAULT_AND_CLUSTER"), + XdExistingCluster("XD_EXISTING_CLUSTER"), + ExistingDbHome("EXISTING_DB_HOME"), + + /** + * 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(Source.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Source v : Source.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Source(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Source create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Source', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithDbHome.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithDbHome.java new file mode 100644 index 0000000000..71ecba6757 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithDbHome.java @@ -0,0 +1,629 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard using a pre-existing Database Home. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseShardDatabaseWithDbHome.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseShardDatabaseWithDbHome + extends DistributedDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of distributed database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseShardDatabaseWithDbHome build() { + DistributedDatabaseShardDatabaseWithDbHome model = + new DistributedDatabaseShardDatabaseWithDbHome( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseShardDatabaseWithDbHome model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseShardDatabaseWithDbHome( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of distributed database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of distributed database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseShardDatabaseWithDbHome("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseShardDatabaseWithDbHome)) { + return false; + } + + DistributedDatabaseShardDatabaseWithDbHome other = + (DistributedDatabaseShardDatabaseWithDbHome) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXd.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXd.java new file mode 100644 index 0000000000..c5b16e30dc --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXd.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard running on ExaDB-D. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseShardDatabaseWithExadbXd.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseShardDatabaseWithExadbXd + extends DistributedDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of distributed database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseShardDatabaseWithExadbXd build() { + DistributedDatabaseShardDatabaseWithExadbXd model = + new DistributedDatabaseShardDatabaseWithExadbXd( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseShardDatabaseWithExadbXd model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseShardDatabaseWithExadbXd( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of distributed database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of distributed database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseShardDatabaseWithExadbXd("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseShardDatabaseWithExadbXd)) { + return false; + } + + DistributedDatabaseShardDatabaseWithExadbXd other = + (DistributedDatabaseShardDatabaseWithExadbXd) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXs.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXs.java new file mode 100644 index 0000000000..22ac6ea554 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXs.java @@ -0,0 +1,629 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard running on ExaDB-XS. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseShardDatabaseWithExadbXs.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseShardDatabaseWithExadbXs + extends DistributedDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of distributed database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseShardDatabaseWithExadbXs build() { + DistributedDatabaseShardDatabaseWithExadbXs model = + new DistributedDatabaseShardDatabaseWithExadbXs( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vmClusterId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseShardDatabaseWithExadbXs model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseShardDatabaseWithExadbXs( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vmClusterId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vmClusterId = vmClusterId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VmCluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * Status of distributed database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of distributed database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseShardDatabaseWithExadbXs("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseShardDatabaseWithExadbXs)) { + return false; + } + + DistributedDatabaseShardDatabaseWithExadbXs other = + (DistributedDatabaseShardDatabaseWithExadbXs) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewCluster.java new file mode 100644 index 0000000000..0a07d2feff --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewCluster.java @@ -0,0 +1,709 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard on ExaDB-XS with a new cluster. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseShardDatabaseWithExadbXsNewCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseShardDatabaseWithExadbXsNewCluster + extends DistributedDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of distributed database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private DistributedDbVmCluster vmClusterDetails; + + public Builder vmClusterDetails(DistributedDbVmCluster vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseShardDatabaseWithExadbXsNewCluster build() { + DistributedDatabaseShardDatabaseWithExadbXsNewCluster model = + new DistributedDatabaseShardDatabaseWithExadbXsNewCluster( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.availabilityDomain, + this.exascaleDbStorageVaultId, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseShardDatabaseWithExadbXsNewCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseShardDatabaseWithExadbXsNewCluster( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String availabilityDomain, + String exascaleDbStorageVaultId, + DistributedDbVmCluster vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.availabilityDomain = availabilityDomain; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * Status of distributed database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of distributed database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the exascale db storage vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final DistributedDbVmCluster vmClusterDetails; + + public DistributedDbVmCluster getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseShardDatabaseWithExadbXsNewCluster("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseShardDatabaseWithExadbXsNewCluster)) { + return false; + } + + DistributedDatabaseShardDatabaseWithExadbXsNewCluster other = + (DistributedDatabaseShardDatabaseWithExadbXsNewCluster) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster.java new file mode 100644 index 0000000000..1a86c2022e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster.java @@ -0,0 +1,693 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of a distributed database shard on ExaDB-XS with a new cluster and storage vault. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster + extends DistributedDatabaseShardDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @param dbHomeId the value to set + * @return this builder + **/ + public Builder dbHomeId(String dbHomeId) { + this.dbHomeId = dbHomeId; + this.__explicitlySet__.add("dbHomeId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of distributed database shard. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @param supportingResourceId the value to set + * @return this builder + **/ + public Builder supportingResourceId(String supportingResourceId) { + this.supportingResourceId = supportingResourceId; + this.__explicitlySet__.add("supportingResourceId"); + return this; + } + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @param containerDatabaseId the value to set + * @return this builder + **/ + public Builder containerDatabaseId(String containerDatabaseId) { + this.containerDatabaseId = containerDatabaseId; + this.__explicitlySet__.add("containerDatabaseId"); + return this; + } + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private DistributedDbStorageVault dbStorageVaultDetails; + + public Builder dbStorageVaultDetails(DistributedDbStorageVault dbStorageVaultDetails) { + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.__explicitlySet__.add("dbStorageVaultDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private DistributedDbVmCluster vmClusterDetails; + + public Builder vmClusterDetails(DistributedDbVmCluster vmClusterDetails) { + this.vmClusterDetails = vmClusterDetails; + this.__explicitlySet__.add("vmClusterDetails"); + return this; + } + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(DistributedDbProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @param transportType the value to set + * @return this builder + **/ + public Builder transportType(DistributedDbTransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster build() { + DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster model = + new DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster( + this.name, + this.timeCreated, + this.timeUpdated, + this.metadata, + this.dbHomeId, + this.vaultId, + this.kmsKeyId, + this.kmsKeyVersionId, + this.status, + this.supportingResourceId, + this.containerDatabaseId, + this.availabilityDomain, + this.dbStorageVaultDetails, + this.vmClusterDetails, + this.protectionMode, + this.transportType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("dbHomeId")) { + this.dbHomeId(model.getDbHomeId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("supportingResourceId")) { + this.supportingResourceId(model.getSupportingResourceId()); + } + if (model.wasPropertyExplicitlySet("containerDatabaseId")) { + this.containerDatabaseId(model.getContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("dbStorageVaultDetails")) { + this.dbStorageVaultDetails(model.getDbStorageVaultDetails()); + } + if (model.wasPropertyExplicitlySet("vmClusterDetails")) { + this.vmClusterDetails(model.getVmClusterDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("transportType")) { + this.transportType(model.getTransportType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster( + String name, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DistributedDbMetadata metadata, + String dbHomeId, + String vaultId, + String kmsKeyId, + String kmsKeyVersionId, + Status status, + String supportingResourceId, + String containerDatabaseId, + String availabilityDomain, + DistributedDbStorageVault dbStorageVaultDetails, + DistributedDbVmCluster vmClusterDetails, + DistributedDbProtectionMode protectionMode, + DistributedDbTransportType transportType) { + super(name, timeCreated, timeUpdated, metadata); + this.dbHomeId = dbHomeId; + this.vaultId = vaultId; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; + this.status = status; + this.supportingResourceId = supportingResourceId; + this.containerDatabaseId = containerDatabaseId; + this.availabilityDomain = availabilityDomain; + this.dbStorageVaultDetails = dbStorageVaultDetails; + this.vmClusterDetails = vmClusterDetails; + this.protectionMode = protectionMode; + this.transportType = transportType; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") + private final String dbHomeId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Home. + * @return the value + **/ + public String getDbHomeId() { + return dbHomeId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + * This parameter and {@code kmsKeyId} are required for Customer Managed Keys. + * + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + /** + * Status of distributed database shard. + **/ + public enum Status { + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + Updating("UPDATING"), + Creating("CREATING"), + Created("CREATED"), + ReadyForConfiguration("READY_FOR_CONFIGURATION"), + Configured("CONFIGURED"), + 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(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of distributed database shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of distributed database shard. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * the identifier of the underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportingResourceId") + private final String supportingResourceId; + + /** + * the identifier of the underlying supporting resource. + * @return the value + **/ + public String getSupportingResourceId() { + return supportingResourceId; + } + + /** + * the identifier of the container database for underlying supporting resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerDatabaseId") + private final String containerDatabaseId; + + /** + * the identifier of the container database for underlying supporting resource. + * @return the value + **/ + public String getContainerDatabaseId() { + return containerDatabaseId; + } + + /** + * The name of the availability domain that the distributed database shard will be located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain that the distributed database shard will be located in. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultDetails") + private final DistributedDbStorageVault dbStorageVaultDetails; + + public DistributedDbStorageVault getDbStorageVaultDetails() { + return dbStorageVaultDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterDetails") + private final DistributedDbVmCluster vmClusterDetails; + + public DistributedDbVmCluster getVmClusterDetails() { + return vmClusterDetails; + } + + /** + * The protection mode used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final DistributedDbProtectionMode protectionMode; + + /** + * The protection mode used for the Data Guard association. + * @return the value + **/ + public DistributedDbProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The transport type used for the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private final DistributedDbTransportType transportType; + + /** + * The transport type used for the Data Guard association. + * @return the value + **/ + public DistributedDbTransportType getTransportType() { + return transportType; + } + + @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("DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", dbHomeId=").append(String.valueOf(this.dbHomeId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", supportingResourceId=").append(String.valueOf(this.supportingResourceId)); + sb.append(", containerDatabaseId=").append(String.valueOf(this.containerDatabaseId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", dbStorageVaultDetails=").append(String.valueOf(this.dbStorageVaultDetails)); + sb.append(", vmClusterDetails=").append(String.valueOf(this.vmClusterDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", transportType=").append(String.valueOf(this.transportType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster)) { + return false; + } + + DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster other = + (DistributedDatabaseShardDatabaseWithExadbXsNewVaultAndCluster) o; + return java.util.Objects.equals(this.dbHomeId, other.dbHomeId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.supportingResourceId, other.supportingResourceId) + && java.util.Objects.equals(this.containerDatabaseId, other.containerDatabaseId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.dbStorageVaultDetails, other.dbStorageVaultDetails) + && java.util.Objects.equals(this.vmClusterDetails, other.vmClusterDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals(this.transportType, other.transportType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dbHomeId == null ? 43 : this.dbHomeId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.supportingResourceId == null + ? 43 + : this.supportingResourceId.hashCode()); + result = + (result * PRIME) + + (this.containerDatabaseId == null + ? 43 + : this.containerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.dbStorageVaultDetails == null + ? 43 + : this.dbStorageVaultDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterDetails == null ? 43 : this.vmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.transportType == null ? 43 : this.transportType.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseSummary.java new file mode 100644 index 0000000000..73ce89cb09 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDatabaseSummary.java @@ -0,0 +1,1398 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Globally distributed database. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDatabaseSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDatabaseSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "databaseVersion", + "lifecycleState", + "lifecycleDetails", + "prefix", + "privateEndpointIds", + "notificationTopicIds", + "characterSet", + "ncharacterSet", + "listenerPort", + "listenerPortTls", + "onsPortLocal", + "onsPortRemote", + "systemChunkCount", + "autoResourceManagementConfig", + "systemRaftReplicationUnitCount", + "metadata", + "shardingMethod", + "replicationMethod", + "dbDeploymentType", + "freeformTags", + "definedTags", + "systemTags" + }) + public DistributedDatabaseSummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String databaseVersion, + DistributedDatabase.LifecycleState lifecycleState, + String lifecycleDetails, + String prefix, + java.util.List privateEndpointIds, + java.util.List notificationTopicIds, + String characterSet, + String ncharacterSet, + Integer listenerPort, + Integer listenerPortTls, + Integer onsPortLocal, + Integer onsPortRemote, + Integer systemChunkCount, + AutoResourceManagementConfigurationDetails autoResourceManagementConfig, + Integer systemRaftReplicationUnitCount, + DistributedDbMetadata metadata, + ShardingMethod shardingMethod, + ReplicationMethod replicationMethod, + DbDeploymentType dbDeploymentType, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.databaseVersion = databaseVersion; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.prefix = prefix; + this.privateEndpointIds = privateEndpointIds; + this.notificationTopicIds = notificationTopicIds; + this.characterSet = characterSet; + this.ncharacterSet = ncharacterSet; + this.listenerPort = listenerPort; + this.listenerPortTls = listenerPortTls; + this.onsPortLocal = onsPortLocal; + this.onsPortRemote = onsPortRemote; + this.systemChunkCount = systemChunkCount; + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.metadata = metadata; + this.shardingMethod = shardingMethod; + this.replicationMethod = replicationMethod; + this.dbDeploymentType = dbDeploymentType; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + * @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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Globally distributed database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string + * @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 time the Globally distributed database was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string + * @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; + } + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * Lifecycle state of sharded database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DistributedDatabase.LifecycleState lifecycleState; + + /** + * Lifecycle state of sharded database. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DistributedDatabase.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The lifecycleDetails for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed database. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @param privateEndpointIds the value to set + * @return this builder + **/ + public Builder privateEndpointIds(java.util.List privateEndpointIds) { + this.privateEndpointIds = privateEndpointIds; + this.__explicitlySet__.add("privateEndpointIds"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + /** + * The character set for the database. + * @param characterSet the value to set + * @return this builder + **/ + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + /** + * The national character set for the database. + * @param ncharacterSet the value to set + * @return this builder + **/ + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + /** + * The listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * The listener port number for the Globally distributed database. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The TLS listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed database. + * @param listenerPortTls the value to set + * @return this builder + **/ + public Builder listenerPortTls(Integer listenerPortTls) { + this.listenerPortTls = listenerPortTls; + this.__explicitlySet__.add("listenerPortTls"); + return this; + } + /** + * Ons local port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private Integer onsPortLocal; + + /** + * Ons local port number for the Globally distributed database. + * @param onsPortLocal the value to set + * @return this builder + **/ + public Builder onsPortLocal(Integer onsPortLocal) { + this.onsPortLocal = onsPortLocal; + this.__explicitlySet__.add("onsPortLocal"); + return this; + } + /** + * Ons remote port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private Integer onsPortRemote; + + /** + * Ons remote port number for the Globally distributed database. + * @param onsPortRemote the value to set + * @return this builder + **/ + public Builder onsPortRemote(Integer onsPortRemote) { + this.onsPortRemote = onsPortRemote; + this.__explicitlySet__.add("onsPortRemote"); + return this; + } + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @param systemChunkCount the value to set + * @return this builder + **/ + public Builder systemChunkCount(Integer systemChunkCount) { + this.systemChunkCount = systemChunkCount; + this.__explicitlySet__.add("systemChunkCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public Builder autoResourceManagementConfig( + AutoResourceManagementConfigurationDetails autoResourceManagementConfig) { + this.autoResourceManagementConfig = autoResourceManagementConfig; + this.__explicitlySet__.add("autoResourceManagementConfig"); + return this; + } + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @param systemRaftReplicationUnitCount the value to set + * @return this builder + **/ + public Builder systemRaftReplicationUnitCount(Integer systemRaftReplicationUnitCount) { + this.systemRaftReplicationUnitCount = systemRaftReplicationUnitCount; + this.__explicitlySet__.add("systemRaftReplicationUnitCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private DistributedDbMetadata metadata; + + public Builder metadata(DistributedDbMetadata metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + /** + * Sharding methods for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed database. + * @param shardingMethod the value to set + * @return this builder + **/ + public Builder shardingMethod(ShardingMethod shardingMethod) { + this.shardingMethod = shardingMethod; + this.__explicitlySet__.add("shardingMethod"); + return this; + } + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @param replicationMethod the value to set + * @return this builder + **/ + public Builder replicationMethod(ReplicationMethod replicationMethod) { + this.replicationMethod = replicationMethod; + this.__explicitlySet__.add("replicationMethod"); + return this; + } + /** + * The distributed database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private DbDeploymentType dbDeploymentType; + + /** + * The distributed database deployment type. + * + * @param dbDeploymentType the value to set + * @return this builder + **/ + public Builder dbDeploymentType(DbDeploymentType dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + this.__explicitlySet__.add("dbDeploymentType"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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 DistributedDatabaseSummary build() { + DistributedDatabaseSummary model = + new DistributedDatabaseSummary( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.databaseVersion, + this.lifecycleState, + this.lifecycleDetails, + this.prefix, + this.privateEndpointIds, + this.notificationTopicIds, + this.characterSet, + this.ncharacterSet, + this.listenerPort, + this.listenerPortTls, + this.onsPortLocal, + this.onsPortRemote, + this.systemChunkCount, + this.autoResourceManagementConfig, + this.systemRaftReplicationUnitCount, + this.metadata, + this.shardingMethod, + this.replicationMethod, + this.dbDeploymentType, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDatabaseSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIds")) { + this.privateEndpointIds(model.getPrivateEndpointIds()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("listenerPortTls")) { + this.listenerPortTls(model.getListenerPortTls()); + } + if (model.wasPropertyExplicitlySet("onsPortLocal")) { + this.onsPortLocal(model.getOnsPortLocal()); + } + if (model.wasPropertyExplicitlySet("onsPortRemote")) { + this.onsPortRemote(model.getOnsPortRemote()); + } + if (model.wasPropertyExplicitlySet("systemChunkCount")) { + this.systemChunkCount(model.getSystemChunkCount()); + } + if (model.wasPropertyExplicitlySet("autoResourceManagementConfig")) { + this.autoResourceManagementConfig(model.getAutoResourceManagementConfig()); + } + if (model.wasPropertyExplicitlySet("systemRaftReplicationUnitCount")) { + this.systemRaftReplicationUnitCount(model.getSystemRaftReplicationUnitCount()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("shardingMethod")) { + this.shardingMethod(model.getShardingMethod()); + } + if (model.wasPropertyExplicitlySet("replicationMethod")) { + this.replicationMethod(model.getReplicationMethod()); + } + if (model.wasPropertyExplicitlySet("dbDeploymentType")) { + this.dbDeploymentType(model.getDbDeploymentType()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Globally distributed database compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Globally distributed database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the Globally distributed database was created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Globally distributed database was last updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * Oracle Database version for the shards and catalog used in Globally distributed database. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * Lifecycle state of sharded database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DistributedDatabase.LifecycleState lifecycleState; + + /** + * Lifecycle state of sharded database. + * @return the value + **/ + public DistributedDatabase.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The lifecycleDetails for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * The lifecycleDetails for the Globally distributed database. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character + * has to be a letter followed by any combination of letter and number. + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIds") + private final java.util.List privateEndpointIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private endpoint associated with Globally distributed autonomous database. + * @return the value + **/ + public java.util.List getPrivateEndpointIds() { + return privateEndpointIds; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * The character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private final String characterSet; + + /** + * The character set for the database. + * @return the value + **/ + public String getCharacterSet() { + return characterSet; + } + + /** + * The national character set for the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private final String ncharacterSet; + + /** + * The national character set for the database. + * @return the value + **/ + public String getNcharacterSet() { + return ncharacterSet; + } + + /** + * The listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * The listener port number for the Globally distributed database. + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + /** + * The TLS listener port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPortTls") + private final Integer listenerPortTls; + + /** + * The TLS listener port number for the Globally distributed database. + * @return the value + **/ + public Integer getListenerPortTls() { + return listenerPortTls; + } + + /** + * Ons local port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortLocal") + private final Integer onsPortLocal; + + /** + * Ons local port number for the Globally distributed database. + * @return the value + **/ + public Integer getOnsPortLocal() { + return onsPortLocal; + } + + /** + * Ons remote port number for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onsPortRemote") + private final Integer onsPortRemote; + + /** + * Ons remote port number for the Globally distributed database. + * @return the value + **/ + public Integer getOnsPortRemote() { + return onsPortRemote; + } + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemChunkCount") + private final Integer systemChunkCount; + + /** + * Count of chunks associated with system raft clusters or system data guard databases. + * @return the value + **/ + public Integer getSystemChunkCount() { + return systemChunkCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoResourceManagementConfig") + private final AutoResourceManagementConfigurationDetails autoResourceManagementConfig; + + public AutoResourceManagementConfigurationDetails getAutoResourceManagementConfig() { + return autoResourceManagementConfig; + } + + /** + * Number of replication units associated with system raft clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemRaftReplicationUnitCount") + private final Integer systemRaftReplicationUnitCount; + + /** + * Number of replication units associated with system raft clusters. + * @return the value + **/ + public Integer getSystemRaftReplicationUnitCount() { + return systemRaftReplicationUnitCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final DistributedDbMetadata metadata; + + public DistributedDbMetadata getMetadata() { + return metadata; + } + + /** + * Sharding methods for the Globally distributed database. + **/ + public enum ShardingMethod { + User("USER"), + System("SYSTEM"), + Composite("COMPOSITE"), + + /** + * 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(ShardingMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShardingMethod v : ShardingMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ShardingMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShardingMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ShardingMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Sharding methods for the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardingMethod") + private final ShardingMethod shardingMethod; + + /** + * Sharding methods for the Globally distributed database. + * @return the value + **/ + public ShardingMethod getShardingMethod() { + return shardingMethod; + } + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + public enum ReplicationMethod { + Raft("RAFT"), + Dg("DG"), + + /** + * 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(ReplicationMethod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ReplicationMethod v : ReplicationMethod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ReplicationMethod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ReplicationMethod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ReplicationMethod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationMethod") + private final ReplicationMethod replicationMethod; + + /** + * The Replication method for Globally distributed database. Use RAFT for Raft based replication. + * With RAFT replication, shards cannot have peers details set on them. In case shards need to + * have peers, please do not set RAFT replicationMethod. For all non RAFT replication cases (with or + * without peers), please set replicationMethod as DG or do not set any value for replicationMethod. + * + * @return the value + **/ + public ReplicationMethod getReplicationMethod() { + return replicationMethod; + } + + /** + * The distributed database deployment type. + * + **/ + public enum DbDeploymentType { + Exadb("EXADB"), + + /** + * 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(DbDeploymentType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DbDeploymentType v : DbDeploymentType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DbDeploymentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DbDeploymentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DbDeploymentType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The distributed database deployment type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbDeploymentType") + private final DbDeploymentType dbDeploymentType; + + /** + * The distributed database deployment type. + * + * @return the value + **/ + public DbDeploymentType getDbDeploymentType() { + return dbDeploymentType; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * 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("DistributedDatabaseSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", privateEndpointIds=").append(String.valueOf(this.privateEndpointIds)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + sb.append(", characterSet=").append(String.valueOf(this.characterSet)); + sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", listenerPortTls=").append(String.valueOf(this.listenerPortTls)); + sb.append(", onsPortLocal=").append(String.valueOf(this.onsPortLocal)); + sb.append(", onsPortRemote=").append(String.valueOf(this.onsPortRemote)); + sb.append(", systemChunkCount=").append(String.valueOf(this.systemChunkCount)); + sb.append(", autoResourceManagementConfig=") + .append(String.valueOf(this.autoResourceManagementConfig)); + sb.append(", systemRaftReplicationUnitCount=") + .append(String.valueOf(this.systemRaftReplicationUnitCount)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", shardingMethod=").append(String.valueOf(this.shardingMethod)); + sb.append(", replicationMethod=").append(String.valueOf(this.replicationMethod)); + sb.append(", dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + 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 DistributedDatabaseSummary)) { + return false; + } + + DistributedDatabaseSummary other = (DistributedDatabaseSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.privateEndpointIds, other.privateEndpointIds) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && java.util.Objects.equals(this.characterSet, other.characterSet) + && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.listenerPortTls, other.listenerPortTls) + && java.util.Objects.equals(this.onsPortLocal, other.onsPortLocal) + && java.util.Objects.equals(this.onsPortRemote, other.onsPortRemote) + && java.util.Objects.equals(this.systemChunkCount, other.systemChunkCount) + && java.util.Objects.equals( + this.autoResourceManagementConfig, other.autoResourceManagementConfig) + && java.util.Objects.equals( + this.systemRaftReplicationUnitCount, other.systemRaftReplicationUnitCount) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.shardingMethod, other.shardingMethod) + && java.util.Objects.equals(this.replicationMethod, other.replicationMethod) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && 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.displayName == null ? 43 : this.displayName.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.databaseVersion == null ? 43 : this.databaseVersion.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.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIds == null + ? 43 + : this.privateEndpointIds.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.hashCode()); + result = (result * PRIME) + (this.characterSet == null ? 43 : this.characterSet.hashCode()); + result = + (result * PRIME) + + (this.ncharacterSet == null ? 43 : this.ncharacterSet.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.listenerPortTls == null ? 43 : this.listenerPortTls.hashCode()); + result = (result * PRIME) + (this.onsPortLocal == null ? 43 : this.onsPortLocal.hashCode()); + result = + (result * PRIME) + + (this.onsPortRemote == null ? 43 : this.onsPortRemote.hashCode()); + result = + (result * PRIME) + + (this.systemChunkCount == null ? 43 : this.systemChunkCount.hashCode()); + result = + (result * PRIME) + + (this.autoResourceManagementConfig == null + ? 43 + : this.autoResourceManagementConfig.hashCode()); + result = + (result * PRIME) + + (this.systemRaftReplicationUnitCount == null + ? 43 + : this.systemRaftReplicationUnitCount.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.shardingMethod == null ? 43 : this.shardingMethod.hashCode()); + result = + (result * PRIME) + + (this.replicationMethod == null ? 43 : this.replicationMethod.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupConfig.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupConfig.java new file mode 100644 index 0000000000..0b14c9dcf9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupConfig.java @@ -0,0 +1,813 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Backup Options + * 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.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbBackupConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbBackupConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isAutoBackupEnabled", + "recoveryWindowInDays", + "autoBackupWindow", + "autoFullBackupWindow", + "autoFullBackupDay", + "canRunImmediateFullBackup", + "isRemoteBackupEnabled", + "remoteRegion", + "backupDestinationDetails", + "backupDeletionPolicy" + }) + public DistributedDbBackupConfig( + Boolean isAutoBackupEnabled, + Integer recoveryWindowInDays, + AutoBackupWindow autoBackupWindow, + AutoFullBackupWindow autoFullBackupWindow, + AutoFullBackupDay autoFullBackupDay, + Boolean canRunImmediateFullBackup, + Boolean isRemoteBackupEnabled, + String remoteRegion, + java.util.List backupDestinationDetails, + BackupDeletionPolicy backupDeletionPolicy) { + super(); + this.isAutoBackupEnabled = isAutoBackupEnabled; + this.recoveryWindowInDays = recoveryWindowInDays; + this.autoBackupWindow = autoBackupWindow; + this.autoFullBackupWindow = autoFullBackupWindow; + this.autoFullBackupDay = autoFullBackupDay; + this.canRunImmediateFullBackup = canRunImmediateFullBackup; + this.isRemoteBackupEnabled = isRemoteBackupEnabled; + this.remoteRegion = remoteRegion; + this.backupDestinationDetails = backupDestinationDetails; + this.backupDeletionPolicy = backupDeletionPolicy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoBackupEnabled") + private Boolean isAutoBackupEnabled; + + /** + * If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + * @param isAutoBackupEnabled the value to set + * @return this builder + **/ + public Builder isAutoBackupEnabled(Boolean isAutoBackupEnabled) { + this.isAutoBackupEnabled = isAutoBackupEnabled; + this.__explicitlySet__.add("isAutoBackupEnabled"); + return this; + } + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups only. After a new automatic backup has been created, Oracle removes old automatic backups that are created before the window. + * When the value is updated, it is applied to all existing automatic backups. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recoveryWindowInDays") + private Integer recoveryWindowInDays; + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups only. After a new automatic backup has been created, Oracle removes old automatic backups that are created before the window. + * When the value is updated, it is applied to all existing automatic backups. + * + * @param recoveryWindowInDays the value to set + * @return this builder + **/ + public Builder recoveryWindowInDays(Integer recoveryWindowInDays) { + this.recoveryWindowInDays = recoveryWindowInDays; + this.__explicitlySet__.add("recoveryWindowInDays"); + return this; + } + /** + * Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoBackupWindow") + private AutoBackupWindow autoBackupWindow; + + /** + * Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + * @param autoBackupWindow the value to set + * @return this builder + **/ + public Builder autoBackupWindow(AutoBackupWindow autoBackupWindow) { + this.autoBackupWindow = autoBackupWindow; + this.__explicitlySet__.add("autoBackupWindow"); + return this; + } + /** + * Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoFullBackupWindow") + private AutoFullBackupWindow autoFullBackupWindow; + + /** + * Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + * @param autoFullBackupWindow the value to set + * @return this builder + **/ + public Builder autoFullBackupWindow(AutoFullBackupWindow autoFullBackupWindow) { + this.autoFullBackupWindow = autoFullBackupWindow; + this.__explicitlySet__.add("autoFullBackupWindow"); + return this; + } + /** + * Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoFullBackupDay") + private AutoFullBackupDay autoFullBackupDay; + + /** + * Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday. + * @param autoFullBackupDay the value to set + * @return this builder + **/ + public Builder autoFullBackupDay(AutoFullBackupDay autoFullBackupDay) { + this.autoFullBackupDay = autoFullBackupDay; + this.__explicitlySet__.add("autoFullBackupDay"); + return this; + } + /** + * If set to true, configures automatic full backups in the local region (the region of the DB system) for the first backup run immediately. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canRunImmediateFullBackup") + private Boolean canRunImmediateFullBackup; + + /** + * If set to true, configures automatic full backups in the local region (the region of the DB system) for the first backup run immediately. + * @param canRunImmediateFullBackup the value to set + * @return this builder + **/ + public Builder canRunImmediateFullBackup(Boolean canRunImmediateFullBackup) { + this.canRunImmediateFullBackup = canRunImmediateFullBackup; + this.__explicitlySet__.add("canRunImmediateFullBackup"); + return this; + } + /** + * If set to true, configures automatic incremental backups in the local region (the region of the DB system) and the remote region with a default frequency of 1 hour. + * If you previously used RMAN or dbcli to configure backups, using the Console or the API for manged backups creates a new backup configuration for your database. The new configuration replaces the configuration created with RMAN or dbcli. + * This means that you can no longer rely on your previously configured unmanaged backups to work. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemoteBackupEnabled") + private Boolean isRemoteBackupEnabled; + + /** + * If set to true, configures automatic incremental backups in the local region (the region of the DB system) and the remote region with a default frequency of 1 hour. + * If you previously used RMAN or dbcli to configure backups, using the Console or the API for manged backups creates a new backup configuration for your database. The new configuration replaces the configuration created with RMAN or dbcli. + * This means that you can no longer rely on your previously configured unmanaged backups to work. + * + * @param isRemoteBackupEnabled the value to set + * @return this builder + **/ + public Builder isRemoteBackupEnabled(Boolean isRemoteBackupEnabled) { + this.isRemoteBackupEnabled = isRemoteBackupEnabled; + this.__explicitlySet__.add("isRemoteBackupEnabled"); + return this; + } + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @param remoteRegion the value to set + * @return this builder + **/ + public Builder remoteRegion(String remoteRegion) { + this.remoteRegion = remoteRegion; + this.__explicitlySet__.add("remoteRegion"); + return this; + } + /** + * Backup destination details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private java.util.List backupDestinationDetails; + + /** + * Backup destination details. + * @param backupDestinationDetails the value to set + * @return this builder + **/ + public Builder backupDestinationDetails( + java.util.List backupDestinationDetails) { + this.backupDestinationDetails = backupDestinationDetails; + this.__explicitlySet__.add("backupDestinationDetails"); + return this; + } + /** + * This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently... - RETAIN will keep the backups as per the policy defined for database backups. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDeletionPolicy") + private BackupDeletionPolicy backupDeletionPolicy; + + /** + * This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently... - RETAIN will keep the backups as per the policy defined for database backups. + * @param backupDeletionPolicy the value to set + * @return this builder + **/ + public Builder backupDeletionPolicy(BackupDeletionPolicy backupDeletionPolicy) { + this.backupDeletionPolicy = backupDeletionPolicy; + this.__explicitlySet__.add("backupDeletionPolicy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbBackupConfig build() { + DistributedDbBackupConfig model = + new DistributedDbBackupConfig( + this.isAutoBackupEnabled, + this.recoveryWindowInDays, + this.autoBackupWindow, + this.autoFullBackupWindow, + this.autoFullBackupDay, + this.canRunImmediateFullBackup, + this.isRemoteBackupEnabled, + this.remoteRegion, + this.backupDestinationDetails, + this.backupDeletionPolicy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbBackupConfig model) { + if (model.wasPropertyExplicitlySet("isAutoBackupEnabled")) { + this.isAutoBackupEnabled(model.getIsAutoBackupEnabled()); + } + if (model.wasPropertyExplicitlySet("recoveryWindowInDays")) { + this.recoveryWindowInDays(model.getRecoveryWindowInDays()); + } + if (model.wasPropertyExplicitlySet("autoBackupWindow")) { + this.autoBackupWindow(model.getAutoBackupWindow()); + } + if (model.wasPropertyExplicitlySet("autoFullBackupWindow")) { + this.autoFullBackupWindow(model.getAutoFullBackupWindow()); + } + if (model.wasPropertyExplicitlySet("autoFullBackupDay")) { + this.autoFullBackupDay(model.getAutoFullBackupDay()); + } + if (model.wasPropertyExplicitlySet("canRunImmediateFullBackup")) { + this.canRunImmediateFullBackup(model.getCanRunImmediateFullBackup()); + } + if (model.wasPropertyExplicitlySet("isRemoteBackupEnabled")) { + this.isRemoteBackupEnabled(model.getIsRemoteBackupEnabled()); + } + if (model.wasPropertyExplicitlySet("remoteRegion")) { + this.remoteRegion(model.getRemoteRegion()); + } + if (model.wasPropertyExplicitlySet("backupDestinationDetails")) { + this.backupDestinationDetails(model.getBackupDestinationDetails()); + } + if (model.wasPropertyExplicitlySet("backupDeletionPolicy")) { + this.backupDeletionPolicy(model.getBackupDeletionPolicy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoBackupEnabled") + private final Boolean isAutoBackupEnabled; + + /** + * If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + * @return the value + **/ + public Boolean getIsAutoBackupEnabled() { + return isAutoBackupEnabled; + } + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups only. After a new automatic backup has been created, Oracle removes old automatic backups that are created before the window. + * When the value is updated, it is applied to all existing automatic backups. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recoveryWindowInDays") + private final Integer recoveryWindowInDays; + + /** + * Number of days between the current and the earliest point of recoverability covered by automatic backups. + * This value applies to automatic backups only. After a new automatic backup has been created, Oracle removes old automatic backups that are created before the window. + * When the value is updated, it is applied to all existing automatic backups. + * + * @return the value + **/ + public Integer getRecoveryWindowInDays() { + return recoveryWindowInDays; + } + + /** + * Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + public enum AutoBackupWindow { + SlotOne("SLOT_ONE"), + SlotTwo("SLOT_TWO"), + SlotThree("SLOT_THREE"), + SlotFour("SLOT_FOUR"), + SlotFive("SLOT_FIVE"), + SlotSix("SLOT_SIX"), + SlotSeven("SLOT_SEVEN"), + SlotEight("SLOT_EIGHT"), + SlotNine("SLOT_NINE"), + SlotTen("SLOT_TEN"), + SlotEleven("SLOT_ELEVEN"), + SlotTwelve("SLOT_TWELVE"), + + /** + * 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(AutoBackupWindow.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AutoBackupWindow v : AutoBackupWindow.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AutoBackupWindow(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AutoBackupWindow create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AutoBackupWindow', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoBackupWindow") + private final AutoBackupWindow autoBackupWindow; + + /** + * Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + * @return the value + **/ + public AutoBackupWindow getAutoBackupWindow() { + return autoBackupWindow; + } + + /** + * Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + public enum AutoFullBackupWindow { + SlotOne("SLOT_ONE"), + SlotTwo("SLOT_TWO"), + SlotThree("SLOT_THREE"), + SlotFour("SLOT_FOUR"), + SlotFive("SLOT_FIVE"), + SlotSix("SLOT_SIX"), + SlotSeven("SLOT_SEVEN"), + SlotEight("SLOT_EIGHT"), + SlotNine("SLOT_NINE"), + SlotTen("SLOT_TEN"), + SlotEleven("SLOT_ELEVEN"), + SlotTwelve("SLOT_TWELVE"), + + /** + * 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(AutoFullBackupWindow.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AutoFullBackupWindow v : AutoFullBackupWindow.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AutoFullBackupWindow(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AutoFullBackupWindow create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AutoFullBackupWindow', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoFullBackupWindow") + private final AutoFullBackupWindow autoFullBackupWindow; + + /** + * Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). + * Example: {@code SLOT_TWO} + * + * @return the value + **/ + public AutoFullBackupWindow getAutoFullBackupWindow() { + return autoFullBackupWindow; + } + + /** + * Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday. + **/ + public enum AutoFullBackupDay { + Sunday("SUNDAY"), + Monday("MONDAY"), + Tuesday("TUESDAY"), + Wednesday("WEDNESDAY"), + Thursday("THURSDAY"), + Friday("FRIDAY"), + Saturday("SATURDAY"), + + /** + * 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(AutoFullBackupDay.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AutoFullBackupDay v : AutoFullBackupDay.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AutoFullBackupDay(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AutoFullBackupDay create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AutoFullBackupDay', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoFullBackupDay") + private final AutoFullBackupDay autoFullBackupDay; + + /** + * Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday. + * @return the value + **/ + public AutoFullBackupDay getAutoFullBackupDay() { + return autoFullBackupDay; + } + + /** + * If set to true, configures automatic full backups in the local region (the region of the DB system) for the first backup run immediately. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canRunImmediateFullBackup") + private final Boolean canRunImmediateFullBackup; + + /** + * If set to true, configures automatic full backups in the local region (the region of the DB system) for the first backup run immediately. + * @return the value + **/ + public Boolean getCanRunImmediateFullBackup() { + return canRunImmediateFullBackup; + } + + /** + * If set to true, configures automatic incremental backups in the local region (the region of the DB system) and the remote region with a default frequency of 1 hour. + * If you previously used RMAN or dbcli to configure backups, using the Console or the API for manged backups creates a new backup configuration for your database. The new configuration replaces the configuration created with RMAN or dbcli. + * This means that you can no longer rely on your previously configured unmanaged backups to work. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemoteBackupEnabled") + private final Boolean isRemoteBackupEnabled; + + /** + * If set to true, configures automatic incremental backups in the local region (the region of the DB system) and the remote region with a default frequency of 1 hour. + * If you previously used RMAN or dbcli to configure backups, using the Console or the API for manged backups creates a new backup configuration for your database. The new configuration replaces the configuration created with RMAN or dbcli. + * This means that you can no longer rely on your previously configured unmanaged backups to work. + * + * @return the value + **/ + public Boolean getIsRemoteBackupEnabled() { + return isRemoteBackupEnabled; + } + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private final String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @return the value + **/ + public String getRemoteRegion() { + return remoteRegion; + } + + /** + * Backup destination details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationDetails") + private final java.util.List backupDestinationDetails; + + /** + * Backup destination details. + * @return the value + **/ + public java.util.List getBackupDestinationDetails() { + return backupDestinationDetails; + } + + /** + * This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently... - RETAIN will keep the backups as per the policy defined for database backups. + **/ + public enum BackupDeletionPolicy { + DeleteImmediately("DELETE_IMMEDIATELY"), + DeleteAfterRetentionPeriod("DELETE_AFTER_RETENTION_PERIOD"), + + /** + * 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(BackupDeletionPolicy.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackupDeletionPolicy v : BackupDeletionPolicy.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackupDeletionPolicy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackupDeletionPolicy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackupDeletionPolicy', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently... - RETAIN will keep the backups as per the policy defined for database backups. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDeletionPolicy") + private final BackupDeletionPolicy backupDeletionPolicy; + + /** + * This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently... - RETAIN will keep the backups as per the policy defined for database backups. + * @return the value + **/ + public BackupDeletionPolicy getBackupDeletionPolicy() { + return backupDeletionPolicy; + } + + @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("DistributedDbBackupConfig("); + sb.append("super=").append(super.toString()); + sb.append("isAutoBackupEnabled=").append(String.valueOf(this.isAutoBackupEnabled)); + sb.append(", recoveryWindowInDays=").append(String.valueOf(this.recoveryWindowInDays)); + sb.append(", autoBackupWindow=").append(String.valueOf(this.autoBackupWindow)); + sb.append(", autoFullBackupWindow=").append(String.valueOf(this.autoFullBackupWindow)); + sb.append(", autoFullBackupDay=").append(String.valueOf(this.autoFullBackupDay)); + sb.append(", canRunImmediateFullBackup=") + .append(String.valueOf(this.canRunImmediateFullBackup)); + sb.append(", isRemoteBackupEnabled=").append(String.valueOf(this.isRemoteBackupEnabled)); + sb.append(", remoteRegion=").append(String.valueOf(this.remoteRegion)); + sb.append(", backupDestinationDetails=") + .append(String.valueOf(this.backupDestinationDetails)); + sb.append(", backupDeletionPolicy=").append(String.valueOf(this.backupDeletionPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbBackupConfig)) { + return false; + } + + DistributedDbBackupConfig other = (DistributedDbBackupConfig) o; + return java.util.Objects.equals(this.isAutoBackupEnabled, other.isAutoBackupEnabled) + && java.util.Objects.equals(this.recoveryWindowInDays, other.recoveryWindowInDays) + && java.util.Objects.equals(this.autoBackupWindow, other.autoBackupWindow) + && java.util.Objects.equals(this.autoFullBackupWindow, other.autoFullBackupWindow) + && java.util.Objects.equals(this.autoFullBackupDay, other.autoFullBackupDay) + && java.util.Objects.equals( + this.canRunImmediateFullBackup, other.canRunImmediateFullBackup) + && java.util.Objects.equals(this.isRemoteBackupEnabled, other.isRemoteBackupEnabled) + && java.util.Objects.equals(this.remoteRegion, other.remoteRegion) + && java.util.Objects.equals( + this.backupDestinationDetails, other.backupDestinationDetails) + && java.util.Objects.equals(this.backupDeletionPolicy, other.backupDeletionPolicy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isAutoBackupEnabled == null + ? 43 + : this.isAutoBackupEnabled.hashCode()); + result = + (result * PRIME) + + (this.recoveryWindowInDays == null + ? 43 + : this.recoveryWindowInDays.hashCode()); + result = + (result * PRIME) + + (this.autoBackupWindow == null ? 43 : this.autoBackupWindow.hashCode()); + result = + (result * PRIME) + + (this.autoFullBackupWindow == null + ? 43 + : this.autoFullBackupWindow.hashCode()); + result = + (result * PRIME) + + (this.autoFullBackupDay == null ? 43 : this.autoFullBackupDay.hashCode()); + result = + (result * PRIME) + + (this.canRunImmediateFullBackup == null + ? 43 + : this.canRunImmediateFullBackup.hashCode()); + result = + (result * PRIME) + + (this.isRemoteBackupEnabled == null + ? 43 + : this.isRemoteBackupEnabled.hashCode()); + result = (result * PRIME) + (this.remoteRegion == null ? 43 : this.remoteRegion.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationDetails == null + ? 43 + : this.backupDestinationDetails.hashCode()); + result = + (result * PRIME) + + (this.backupDeletionPolicy == null + ? 43 + : this.backupDeletionPolicy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupDestination.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupDestination.java new file mode 100644 index 0000000000..e4ef197fc7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbBackupDestination.java @@ -0,0 +1,403 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Backup destination details + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbBackupDestination.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbBackupDestination + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "type", + "id", + "internetProxy", + "dbrsPolicyId", + "isRemote", + "remoteRegion" + }) + public DistributedDbBackupDestination( + Type type, + String id, + String internetProxy, + String dbrsPolicyId, + Boolean isRemote, + String remoteRegion) { + super(); + this.type = type; + this.id = id; + this.internetProxy = internetProxy; + this.dbrsPolicyId = dbrsPolicyId; + this.isRemote = isRemote; + this.remoteRegion = remoteRegion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the database backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the database backup destination. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Proxy URL to connect to object store. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("internetProxy") + private String internetProxy; + + /** + * Proxy URL to connect to object store. + * @param internetProxy the value to set + * @return this builder + **/ + public Builder internetProxy(String internetProxy) { + this.internetProxy = internetProxy; + this.__explicitlySet__.add("internetProxy"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbrsPolicyId") + private String dbrsPolicyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + * @param dbrsPolicyId the value to set + * @return this builder + **/ + public Builder dbrsPolicyId(String dbrsPolicyId) { + this.dbrsPolicyId = dbrsPolicyId; + this.__explicitlySet__.add("dbrsPolicyId"); + return this; + } + /** + * Indicates whether the backup destination is cross-region or local region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemote") + private Boolean isRemote; + + /** + * Indicates whether the backup destination is cross-region or local region. + * @param isRemote the value to set + * @return this builder + **/ + public Builder isRemote(Boolean isRemote) { + this.isRemote = isRemote; + this.__explicitlySet__.add("isRemote"); + return this; + } + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @param remoteRegion the value to set + * @return this builder + **/ + public Builder remoteRegion(String remoteRegion) { + this.remoteRegion = remoteRegion; + this.__explicitlySet__.add("remoteRegion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbBackupDestination build() { + DistributedDbBackupDestination model = + new DistributedDbBackupDestination( + this.type, + this.id, + this.internetProxy, + this.dbrsPolicyId, + this.isRemote, + this.remoteRegion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbBackupDestination model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("internetProxy")) { + this.internetProxy(model.getInternetProxy()); + } + if (model.wasPropertyExplicitlySet("dbrsPolicyId")) { + this.dbrsPolicyId(model.getDbrsPolicyId()); + } + if (model.wasPropertyExplicitlySet("isRemote")) { + this.isRemote(model.getIsRemote()); + } + if (model.wasPropertyExplicitlySet("remoteRegion")) { + this.remoteRegion(model.getRemoteRegion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the database backup destination. + **/ + public enum Type { + Nfs("NFS"), + ObjectStore("OBJECT_STORE"), + Local("LOCAL"), + Dbrs("DBRS"), + + /** + * 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(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Type of the database backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the database backup destination. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup destination. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Proxy URL to connect to object store. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("internetProxy") + private final String internetProxy; + + /** + * Proxy URL to connect to object store. + * @return the value + **/ + public String getInternetProxy() { + return internetProxy; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbrsPolicyId") + private final String dbrsPolicyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DBRS policy used for backup. + * @return the value + **/ + public String getDbrsPolicyId() { + return dbrsPolicyId; + } + + /** + * Indicates whether the backup destination is cross-region or local region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRemote") + private final Boolean isRemote; + + /** + * Indicates whether the backup destination is cross-region or local region. + * @return the value + **/ + public Boolean getIsRemote() { + return isRemote; + } + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("remoteRegion") + private final String remoteRegion; + + /** + * The name of the remote region where the remote automatic incremental backups will be stored. + * For information about valid region names, see + * [Regions and Availability Domains](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + * + * @return the value + **/ + public String getRemoteRegion() { + return remoteRegion; + } + + @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("DistributedDbBackupDestination("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", internetProxy=").append(String.valueOf(this.internetProxy)); + sb.append(", dbrsPolicyId=").append(String.valueOf(this.dbrsPolicyId)); + sb.append(", isRemote=").append(String.valueOf(this.isRemote)); + sb.append(", remoteRegion=").append(String.valueOf(this.remoteRegion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbBackupDestination)) { + return false; + } + + DistributedDbBackupDestination other = (DistributedDbBackupDestination) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.internetProxy, other.internetProxy) + && java.util.Objects.equals(this.dbrsPolicyId, other.dbrsPolicyId) + && java.util.Objects.equals(this.isRemote, other.isRemote) + && java.util.Objects.equals(this.remoteRegion, other.remoteRegion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.internetProxy == null ? 43 : this.internetProxy.hashCode()); + result = (result * PRIME) + (this.dbrsPolicyId == null ? 43 : this.dbrsPolicyId.hashCode()); + result = (result * PRIME) + (this.isRemote == null ? 43 : this.isRemote.hashCode()); + result = (result * PRIME) + (this.remoteRegion == null ? 43 : this.remoteRegion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbConnectionString.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbConnectionString.java new file mode 100644 index 0000000000..720b9370f3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbConnectionString.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of Globally distributed database connection String. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbConnectionString.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbConnectionString + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"allConnectionStrings"}) + public DistributedDbConnectionString(java.util.Map allConnectionStrings) { + super(); + this.allConnectionStrings = allConnectionStrings; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of connection strings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allConnectionStrings") + private java.util.Map allConnectionStrings; + + /** + * Collection of connection strings. + * @param allConnectionStrings the value to set + * @return this builder + **/ + public Builder allConnectionStrings(java.util.Map allConnectionStrings) { + this.allConnectionStrings = allConnectionStrings; + this.__explicitlySet__.add("allConnectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbConnectionString build() { + DistributedDbConnectionString model = + new DistributedDbConnectionString(this.allConnectionStrings); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbConnectionString model) { + if (model.wasPropertyExplicitlySet("allConnectionStrings")) { + this.allConnectionStrings(model.getAllConnectionStrings()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Collection of connection strings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allConnectionStrings") + private final java.util.Map allConnectionStrings; + + /** + * Collection of connection strings. + * @return the value + **/ + public java.util.Map getAllConnectionStrings() { + return allConnectionStrings; + } + + @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("DistributedDbConnectionString("); + sb.append("super=").append(super.toString()); + sb.append("allConnectionStrings=").append(String.valueOf(this.allConnectionStrings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbConnectionString)) { + return false; + } + + DistributedDbConnectionString other = (DistributedDbConnectionString) o; + return java.util.Objects.equals(this.allConnectionStrings, other.allConnectionStrings) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.allConnectionStrings == null + ? 43 + : this.allConnectionStrings.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGdsControlNodeImage.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGdsControlNodeImage.java new file mode 100644 index 0000000000..b4141844b0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGdsControlNodeImage.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Global Database Services Control(GDS CTL) image details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbGdsControlNodeImage.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbGdsControlNodeImage + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "version"}) + public DistributedDbGdsControlNodeImage(String id, String version) { + super(); + this.id = id; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version associated with the image identified by id. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbGdsControlNodeImage build() { + DistributedDbGdsControlNodeImage model = + new DistributedDbGdsControlNodeImage(this.id, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbGdsControlNodeImage model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global Database Services Control(GDS CTL) software image. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version associated with the image identified by id. + * @return the value + **/ + public String getVersion() { + return version; + } + + @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("DistributedDbGdsControlNodeImage("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbGdsControlNodeImage)) { + return false; + } + + DistributedDbGdsControlNodeImage other = (DistributedDbGdsControlNodeImage) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.version, other.version) + && 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.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGsmImage.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGsmImage.java new file mode 100644 index 0000000000..09fd7d0e5c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbGsmImage.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Global service manager image details + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbGsmImage.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbGsmImage + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "version"}) + public DistributedDbGsmImage(String id, String version) { + super(); + this.id = id; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version associated with the image identified by id. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbGsmImage build() { + DistributedDbGsmImage model = new DistributedDbGsmImage(this.id, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbGsmImage model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Global service manager software image. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The version associated with the image identified by id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version associated with the image identified by id. + * @return the value + **/ + public String getVersion() { + return version; + } + + @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("DistributedDbGsmImage("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbGsmImage)) { + return false; + } + + DistributedDbGsmImage other = (DistributedDbGsmImage) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.version, other.version) + && 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.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbMetadata.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbMetadata.java new file mode 100644 index 0000000000..29f2270db6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbMetadata.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Additional metadata related to Globally distributed database resources. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbMetadata.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbMetadata + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"map"}) + public DistributedDbMetadata(java.util.Map map) { + super(); + this.map = map; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The map containing key-value pair of additional metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("map") + private java.util.Map map; + + /** + * The map containing key-value pair of additional metadata. + * @param map the value to set + * @return this builder + **/ + public Builder map(java.util.Map map) { + this.map = map; + this.__explicitlySet__.add("map"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbMetadata build() { + DistributedDbMetadata model = new DistributedDbMetadata(this.map); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbMetadata model) { + if (model.wasPropertyExplicitlySet("map")) { + this.map(model.getMap()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The map containing key-value pair of additional metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("map") + private final java.util.Map map; + + /** + * The map containing key-value pair of additional metadata. + * @return the value + **/ + public java.util.Map getMap() { + return map; + } + + @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("DistributedDbMetadata("); + sb.append("super=").append(super.toString()); + sb.append("map=").append(String.valueOf(this.map)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbMetadata)) { + return false; + } + + DistributedDbMetadata other = (DistributedDbMetadata) o; + return java.util.Objects.equals(this.map, other.map) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.map == null ? 43 : this.map.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbProtectionMode.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbProtectionMode.java new file mode 100644 index 0000000000..4254724cbe --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbProtectionMode.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The protection mode to set up between the primary and standby databases. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum DistributedDbProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + MaximumProtection("MAXIMUM_PROTECTION"), + + /** + * 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(DistributedDbProtectionMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DistributedDbProtectionMode v : DistributedDbProtectionMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DistributedDbProtectionMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DistributedDbProtectionMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DistributedDbProtectionMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbStorageVault.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbStorageVault.java new file mode 100644 index 0000000000..310068fd53 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbStorageVault.java @@ -0,0 +1,447 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Storage Vault for Distributed Database Resource. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbStorageVault.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbStorageVault + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "dbStorageVaultId", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent", + "subscriptionId", + "isAutoscaleEnabled", + "autoscaleLimitInGBs" + }) + public DistributedDbStorageVault( + String compartmentId, + String displayName, + String dbStorageVaultId, + Integer highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent, + String subscriptionId, + Boolean isAutoscaleEnabled, + Integer autoscaleLimitInGBs) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.dbStorageVaultId = dbStorageVaultId; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.subscriptionId = subscriptionId; + this.isAutoscaleEnabled = isAutoscaleEnabled; + this.autoscaleLimitInGBs = autoscaleLimitInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultId") + private String dbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param dbStorageVaultId the value to set + * @return this builder + **/ + public Builder dbStorageVaultId(String dbStorageVaultId) { + this.dbStorageVaultId = dbStorageVaultId; + this.__explicitlySet__.add("dbStorageVaultId"); + return this; + } + /** + * Total storage capacity in GB for vault storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private Integer highCapacityDatabaseStorage; + + /** + * Total storage capacity in GB for vault storage. + * @param highCapacityDatabaseStorage the value to set + * @return this builder + **/ + public Builder highCapacityDatabaseStorage(Integer highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoscaleEnabled") + private Boolean isAutoscaleEnabled; + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + * @param isAutoscaleEnabled the value to set + * @return this builder + **/ + public Builder isAutoscaleEnabled(Boolean isAutoscaleEnabled) { + this.isAutoscaleEnabled = isAutoscaleEnabled; + this.__explicitlySet__.add("isAutoscaleEnabled"); + return this; + } + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoscaleLimitInGBs") + private Integer autoscaleLimitInGBs; + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + * @param autoscaleLimitInGBs the value to set + * @return this builder + **/ + public Builder autoscaleLimitInGBs(Integer autoscaleLimitInGBs) { + this.autoscaleLimitInGBs = autoscaleLimitInGBs; + this.__explicitlySet__.add("autoscaleLimitInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbStorageVault build() { + DistributedDbStorageVault model = + new DistributedDbStorageVault( + this.compartmentId, + this.displayName, + this.dbStorageVaultId, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent, + this.subscriptionId, + this.isAutoscaleEnabled, + this.autoscaleLimitInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbStorageVault model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("dbStorageVaultId")) { + this.dbStorageVaultId(model.getDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isAutoscaleEnabled")) { + this.isAutoscaleEnabled(model.getIsAutoscaleEnabled()); + } + if (model.wasPropertyExplicitlySet("autoscaleLimitInGBs")) { + this.autoscaleLimitInGBs(model.getAutoscaleLimitInGBs()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for Db Storage Vault. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbStorageVaultId") + private final String dbStorageVaultId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getDbStorageVaultId() { + return dbStorageVaultId; + } + + /** + * Total storage capacity in GB for vault storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final Integer highCapacityDatabaseStorage; + + /** + * Total storage capacity in GB for vault storage. + * @return the value + **/ + public Integer getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoscaleEnabled") + private final Boolean isAutoscaleEnabled; + + /** + * Indicates if autoscale feature is enabled for the Database Storage Vault. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsAutoscaleEnabled() { + return isAutoscaleEnabled; + } + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoscaleLimitInGBs") + private final Integer autoscaleLimitInGBs; + + /** + * The maximum limit, in gigabytes, to which the Vault storage size can automatically scale when auto scaling is enabled for the Database Storage Vault. + * @return the value + **/ + public Integer getAutoscaleLimitInGBs() { + return autoscaleLimitInGBs; + } + + @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("DistributedDbStorageVault("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", dbStorageVaultId=").append(String.valueOf(this.dbStorageVaultId)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isAutoscaleEnabled=").append(String.valueOf(this.isAutoscaleEnabled)); + sb.append(", autoscaleLimitInGBs=").append(String.valueOf(this.autoscaleLimitInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbStorageVault)) { + return false; + } + + DistributedDbStorageVault other = (DistributedDbStorageVault) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.dbStorageVaultId, other.dbStorageVaultId) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isAutoscaleEnabled, other.isAutoscaleEnabled) + && java.util.Objects.equals(this.autoscaleLimitInGBs, other.autoscaleLimitInGBs) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.dbStorageVaultId == null ? 43 : this.dbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = + (result * PRIME) + + (this.isAutoscaleEnabled == null + ? 43 + : this.isAutoscaleEnabled.hashCode()); + result = + (result * PRIME) + + (this.autoscaleLimitInGBs == null + ? 43 + : this.autoscaleLimitInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbTransportType.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbTransportType.java new file mode 100644 index 0000000000..b0c3be641a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbTransportType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The transport type to use for this Data Guard association. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum DistributedDbTransportType { + Sync("SYNC"), + Async("ASYNC"), + Fastsync("FASTSYNC"), + + /** + * 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(DistributedDbTransportType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DistributedDbTransportType v : DistributedDbTransportType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DistributedDbTransportType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DistributedDbTransportType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DistributedDbTransportType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbVmCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbVmCluster.java new file mode 100644 index 0000000000..2d2bb820ed --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/DistributedDbVmCluster.java @@ -0,0 +1,1022 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The Exadata VM cluster for Distributed Database Resource. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DistributedDbVmCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DistributedDbVmCluster + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "vmClusterId", + "displayName", + "subnetId", + "backupSubnetId", + "enabledECpuCount", + "totalECpuCount", + "vmFileSystemStorageSize", + "sshPublicKeys", + "licenseModel", + "domain", + "privateZoneId", + "nsgIds", + "backupNetworkNsgIds", + "isDiagnosticsEventsEnabled", + "isHealthMonitoringEnabled", + "isIncidentLogsEnabled", + "subscriptionId" + }) + public DistributedDbVmCluster( + String compartmentId, + String vmClusterId, + String displayName, + String subnetId, + String backupSubnetId, + Integer enabledECpuCount, + Integer totalECpuCount, + Integer vmFileSystemStorageSize, + java.util.List sshPublicKeys, + LicenseModel licenseModel, + String domain, + String privateZoneId, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + Boolean isDiagnosticsEventsEnabled, + Boolean isHealthMonitoringEnabled, + Boolean isIncidentLogsEnabled, + String subscriptionId) { + super(); + this.compartmentId = compartmentId; + this.vmClusterId = vmClusterId; + this.displayName = displayName; + this.subnetId = subnetId; + this.backupSubnetId = backupSubnetId; + this.enabledECpuCount = enabledECpuCount; + this.totalECpuCount = totalECpuCount; + this.vmFileSystemStorageSize = vmFileSystemStorageSize; + this.sshPublicKeys = sshPublicKeys; + this.licenseModel = licenseModel; + this.domain = domain; + this.privateZoneId = privateZoneId; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.isDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + this.isHealthMonitoringEnabled = isHealthMonitoringEnabled; + this.isIncidentLogsEnabled = isIncidentLogsEnabled; + this.subscriptionId = subscriptionId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + * @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](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM cluster. + * @param vmClusterId the value to set + * @return this builder + **/ + public Builder vmClusterId(String vmClusterId) { + this.vmClusterId = vmClusterId; + this.__explicitlySet__.add("vmClusterId"); + return this; + } + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private String backupSubnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param backupSubnetId the value to set + * @return this builder + **/ + public Builder backupSubnetId(String backupSubnetId) { + this.backupSubnetId = backupSubnetId; + this.__explicitlySet__.add("backupSubnetId"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorageSize") + private Integer vmFileSystemStorageSize; + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + * @param vmFileSystemStorageSize the value to set + * @return this builder + **/ + public Builder vmFileSystemStorageSize(Integer vmFileSystemStorageSize) { + this.vmFileSystemStorageSize = vmFileSystemStorageSize; + this.__explicitlySet__.add("vmFileSystemStorageSize"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @param privateZoneId the value to set + * @return this builder + **/ + public Builder privateZoneId(String privateZoneId) { + this.privateZoneId = privateZoneId; + this.__explicitlySet__.add("privateZoneId"); + return this; + } + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiagnosticsEventsEnabled") + private Boolean isDiagnosticsEventsEnabled; + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + * @param isDiagnosticsEventsEnabled the value to set + * @return this builder + **/ + public Builder isDiagnosticsEventsEnabled(Boolean isDiagnosticsEventsEnabled) { + this.isDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + this.__explicitlySet__.add("isDiagnosticsEventsEnabled"); + return this; + } + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHealthMonitoringEnabled") + private Boolean isHealthMonitoringEnabled; + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + * @param isHealthMonitoringEnabled the value to set + * @return this builder + **/ + public Builder isHealthMonitoringEnabled(Boolean isHealthMonitoringEnabled) { + this.isHealthMonitoringEnabled = isHealthMonitoringEnabled; + this.__explicitlySet__.add("isHealthMonitoringEnabled"); + return this; + } + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIncidentLogsEnabled") + private Boolean isIncidentLogsEnabled; + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + * @param isIncidentLogsEnabled the value to set + * @return this builder + **/ + public Builder isIncidentLogsEnabled(Boolean isIncidentLogsEnabled) { + this.isIncidentLogsEnabled = isIncidentLogsEnabled; + this.__explicitlySet__.add("isIncidentLogsEnabled"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DistributedDbVmCluster build() { + DistributedDbVmCluster model = + new DistributedDbVmCluster( + this.compartmentId, + this.vmClusterId, + this.displayName, + this.subnetId, + this.backupSubnetId, + this.enabledECpuCount, + this.totalECpuCount, + this.vmFileSystemStorageSize, + this.sshPublicKeys, + this.licenseModel, + this.domain, + this.privateZoneId, + this.nsgIds, + this.backupNetworkNsgIds, + this.isDiagnosticsEventsEnabled, + this.isHealthMonitoringEnabled, + this.isIncidentLogsEnabled, + this.subscriptionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DistributedDbVmCluster model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("vmClusterId")) { + this.vmClusterId(model.getVmClusterId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("backupSubnetId")) { + this.backupSubnetId(model.getBackupSubnetId()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorageSize")) { + this.vmFileSystemStorageSize(model.getVmFileSystemStorageSize()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("privateZoneId")) { + this.privateZoneId(model.getPrivateZoneId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("isDiagnosticsEventsEnabled")) { + this.isDiagnosticsEventsEnabled(model.getIsDiagnosticsEventsEnabled()); + } + if (model.wasPropertyExplicitlySet("isHealthMonitoringEnabled")) { + this.isHealthMonitoringEnabled(model.getIsHealthMonitoringEnabled()); + } + if (model.wasPropertyExplicitlySet("isIncidentLogsEnabled")) { + this.isIncidentLogsEnabled(model.getIsIncidentLogsEnabled()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterId") + private final String vmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM cluster. + * @return the value + **/ + public String getVmClusterId() { + return vmClusterId; + } + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private final String backupSubnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getBackupSubnetId() { + return backupSubnetId; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorageSize") + private final Integer vmFileSystemStorageSize; + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + * @return the value + **/ + public Integer getVmFileSystemStorageSize() { + return vmFileSystemStorageSize; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * 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(LicenseModel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private final String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @return the value + **/ + public String getPrivateZoneId() { + return privateZoneId; + } + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiagnosticsEventsEnabled") + private final Boolean isDiagnosticsEventsEnabled; + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsDiagnosticsEventsEnabled() { + return isDiagnosticsEventsEnabled; + } + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHealthMonitoringEnabled") + private final Boolean isHealthMonitoringEnabled; + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsHealthMonitoringEnabled() { + return isHealthMonitoringEnabled; + } + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIncidentLogsEnabled") + private final Boolean isIncidentLogsEnabled; + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsIncidentLogsEnabled() { + return isIncidentLogsEnabled; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + @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("DistributedDbVmCluster("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", vmClusterId=").append(String.valueOf(this.vmClusterId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", vmFileSystemStorageSize=") + .append(String.valueOf(this.vmFileSystemStorageSize)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", privateZoneId=").append(String.valueOf(this.privateZoneId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", isDiagnosticsEventsEnabled=") + .append(String.valueOf(this.isDiagnosticsEventsEnabled)); + sb.append(", isHealthMonitoringEnabled=") + .append(String.valueOf(this.isHealthMonitoringEnabled)); + sb.append(", isIncidentLogsEnabled=").append(String.valueOf(this.isIncidentLogsEnabled)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DistributedDbVmCluster)) { + return false; + } + + DistributedDbVmCluster other = (DistributedDbVmCluster) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.vmClusterId, other.vmClusterId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals( + this.vmFileSystemStorageSize, other.vmFileSystemStorageSize) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.privateZoneId, other.privateZoneId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals( + this.isDiagnosticsEventsEnabled, other.isDiagnosticsEventsEnabled) + && java.util.Objects.equals( + this.isHealthMonitoringEnabled, other.isHealthMonitoringEnabled) + && java.util.Objects.equals(this.isIncidentLogsEnabled, other.isIncidentLogsEnabled) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && 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.vmClusterId == null ? 43 : this.vmClusterId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.backupSubnetId == null ? 43 : this.backupSubnetId.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorageSize == null + ? 43 + : this.vmFileSystemStorageSize.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = + (result * PRIME) + + (this.privateZoneId == null ? 43 : this.privateZoneId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = + (result * PRIME) + + (this.isDiagnosticsEventsEnabled == null + ? 43 + : this.isDiagnosticsEventsEnabled.hashCode()); + result = + (result * PRIME) + + (this.isHealthMonitoringEnabled == null + ? 43 + : this.isHealthMonitoringEnabled.hashCode()); + result = + (result * PRIME) + + (this.isIncidentLogsEnabled == null + ? 43 + : this.isIncidentLogsEnabled.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedAutonomousDatabaseWalletDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedAutonomousDatabaseWalletDetails.java new file mode 100644 index 0000000000..be799857f0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedAutonomousDatabaseWalletDetails.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details to create and download an Globally distributed autonomous database wallet. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenerateDistributedAutonomousDatabaseWalletDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerateDistributedAutonomousDatabaseWalletDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + public GenerateDistributedAutonomousDatabaseWalletDetails(String password) { + super(); + this.password = password != null ? password.toCharArray() : null; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + @java.beans.ConstructorProperties({"password"}) + public GenerateDistributedAutonomousDatabaseWalletDetails(char[] password) { + super(); + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private char[] password; + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * @param password the value to set + * @return this builder + **/ + public Builder password(char[] password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + public Builder password(String password) { + this.password = password != null ? password.toCharArray() : null; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerateDistributedAutonomousDatabaseWalletDetails build() { + GenerateDistributedAutonomousDatabaseWalletDetails model = + new GenerateDistributedAutonomousDatabaseWalletDetails(this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerateDistributedAutonomousDatabaseWalletDetails model) { + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final char[] password; + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * return the value + * @Deprecated - Use getPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getPassword() { + return password != null ? new String(password) : null; + } + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + public char[] getPassword__AsCharArray() { + return password; + } + + @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("GenerateDistributedAutonomousDatabaseWalletDetails("); + sb.append("super=").append(super.toString()); + sb.append("password=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateDistributedAutonomousDatabaseWalletDetails)) { + return false; + } + + GenerateDistributedAutonomousDatabaseWalletDetails other = + (GenerateDistributedAutonomousDatabaseWalletDetails) o; + return java.util.Objects.equals(this.password, other.password) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedDatabaseWalletDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedDatabaseWalletDetails.java new file mode 100644 index 0000000000..562a7a7087 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/GenerateDistributedDatabaseWalletDetails.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details to create and download an Globally distributed database wallet. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenerateDistributedDatabaseWalletDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerateDistributedDatabaseWalletDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + public GenerateDistributedDatabaseWalletDetails(String password) { + super(); + this.password = password != null ? password.toCharArray() : null; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + @java.beans.ConstructorProperties({"password"}) + public GenerateDistributedDatabaseWalletDetails(char[] password) { + super(); + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private char[] password; + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * @param password the value to set + * @return this builder + **/ + public Builder password(char[] password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + public Builder password(String password) { + this.password = password != null ? password.toCharArray() : null; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerateDistributedDatabaseWalletDetails build() { + GenerateDistributedDatabaseWalletDetails model = + new GenerateDistributedDatabaseWalletDetails(this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerateDistributedDatabaseWalletDetails model) { + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final char[] password; + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * return the value + * @Deprecated - Use getPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getPassword() { + return password != null ? new String(password) : null; + } + + /** + * The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + public char[] getPassword__AsCharArray() { + return password; + } + + @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("GenerateDistributedDatabaseWalletDetails("); + sb.append("super=").append(super.toString()); + sb.append("password=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateDistributedDatabaseWalletDetails)) { + return false; + } + + GenerateDistributedDatabaseWalletDetails other = + (GenerateDistributedDatabaseWalletDetails) o; + return java.util.Objects.equals(this.password, other.password) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedAutonomousDatabaseReplicationUnitDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedAutonomousDatabaseReplicationUnitDetails.java new file mode 100644 index 0000000000..780c04b9e6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedAutonomousDatabaseReplicationUnitDetails.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The details for moving replication units from source shard to destination shard for the Globally distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MoveDistributedAutonomousDatabaseReplicationUnitDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MoveDistributedAutonomousDatabaseReplicationUnitDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "sourceShardName", + "destinationShardName", + "replicationUnits" + }) + public MoveDistributedAutonomousDatabaseReplicationUnitDetails( + String sourceShardName, + String destinationShardName, + java.util.List replicationUnits) { + super(); + this.sourceShardName = sourceShardName; + this.destinationShardName = destinationShardName; + this.replicationUnits = replicationUnits; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the source shard from which to move the chunks out to other shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private String sourceShardName; + + /** + * The name of the source shard from which to move the chunks out to other shards. + * @param sourceShardName the value to set + * @return this builder + **/ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + this.__explicitlySet__.add("sourceShardName"); + return this; + } + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationShardName") + private String destinationShardName; + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + * @param destinationShardName the value to set + * @return this builder + **/ + public Builder destinationShardName(String destinationShardName) { + this.destinationShardName = destinationShardName; + this.__explicitlySet__.add("destinationShardName"); + return this; + } + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnits") + private java.util.List replicationUnits; + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + * @param replicationUnits the value to set + * @return this builder + **/ + public Builder replicationUnits(java.util.List replicationUnits) { + this.replicationUnits = replicationUnits; + this.__explicitlySet__.add("replicationUnits"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MoveDistributedAutonomousDatabaseReplicationUnitDetails build() { + MoveDistributedAutonomousDatabaseReplicationUnitDetails model = + new MoveDistributedAutonomousDatabaseReplicationUnitDetails( + this.sourceShardName, this.destinationShardName, this.replicationUnits); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MoveDistributedAutonomousDatabaseReplicationUnitDetails model) { + if (model.wasPropertyExplicitlySet("sourceShardName")) { + this.sourceShardName(model.getSourceShardName()); + } + if (model.wasPropertyExplicitlySet("destinationShardName")) { + this.destinationShardName(model.getDestinationShardName()); + } + if (model.wasPropertyExplicitlySet("replicationUnits")) { + this.replicationUnits(model.getReplicationUnits()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the source shard from which to move the chunks out to other shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private final String sourceShardName; + + /** + * The name of the source shard from which to move the chunks out to other shards. + * @return the value + **/ + public String getSourceShardName() { + return sourceShardName; + } + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationShardName") + private final String destinationShardName; + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + * @return the value + **/ + public String getDestinationShardName() { + return destinationShardName; + } + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnits") + private final java.util.List replicationUnits; + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + * @return the value + **/ + public java.util.List getReplicationUnits() { + return replicationUnits; + } + + @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("MoveDistributedAutonomousDatabaseReplicationUnitDetails("); + sb.append("super=").append(super.toString()); + sb.append("sourceShardName=").append(String.valueOf(this.sourceShardName)); + sb.append(", destinationShardName=").append(String.valueOf(this.destinationShardName)); + sb.append(", replicationUnits=").append(String.valueOf(this.replicationUnits)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MoveDistributedAutonomousDatabaseReplicationUnitDetails)) { + return false; + } + + MoveDistributedAutonomousDatabaseReplicationUnitDetails other = + (MoveDistributedAutonomousDatabaseReplicationUnitDetails) o; + return java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.destinationShardName, other.destinationShardName) + && java.util.Objects.equals(this.replicationUnits, other.replicationUnits) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = + (result * PRIME) + + (this.destinationShardName == null + ? 43 + : this.destinationShardName.hashCode()); + result = + (result * PRIME) + + (this.replicationUnits == null ? 43 : this.replicationUnits.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedDatabaseReplicationUnitDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedDatabaseReplicationUnitDetails.java new file mode 100644 index 0000000000..5f2904eccd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/MoveDistributedDatabaseReplicationUnitDetails.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The details for moving replication units from source shard to destination shard for the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MoveDistributedDatabaseReplicationUnitDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MoveDistributedDatabaseReplicationUnitDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "sourceShardName", + "destinationShardName", + "replicationUnits" + }) + public MoveDistributedDatabaseReplicationUnitDetails( + String sourceShardName, + String destinationShardName, + java.util.List replicationUnits) { + super(); + this.sourceShardName = sourceShardName; + this.destinationShardName = destinationShardName; + this.replicationUnits = replicationUnits; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the source shard from which to move the chunks out to other shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private String sourceShardName; + + /** + * The name of the source shard from which to move the chunks out to other shards. + * @param sourceShardName the value to set + * @return this builder + **/ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + this.__explicitlySet__.add("sourceShardName"); + return this; + } + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationShardName") + private String destinationShardName; + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + * @param destinationShardName the value to set + * @return this builder + **/ + public Builder destinationShardName(String destinationShardName) { + this.destinationShardName = destinationShardName; + this.__explicitlySet__.add("destinationShardName"); + return this; + } + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnits") + private java.util.List replicationUnits; + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + * @param replicationUnits the value to set + * @return this builder + **/ + public Builder replicationUnits(java.util.List replicationUnits) { + this.replicationUnits = replicationUnits; + this.__explicitlySet__.add("replicationUnits"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MoveDistributedDatabaseReplicationUnitDetails build() { + MoveDistributedDatabaseReplicationUnitDetails model = + new MoveDistributedDatabaseReplicationUnitDetails( + this.sourceShardName, this.destinationShardName, this.replicationUnits); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MoveDistributedDatabaseReplicationUnitDetails model) { + if (model.wasPropertyExplicitlySet("sourceShardName")) { + this.sourceShardName(model.getSourceShardName()); + } + if (model.wasPropertyExplicitlySet("destinationShardName")) { + this.destinationShardName(model.getDestinationShardName()); + } + if (model.wasPropertyExplicitlySet("replicationUnits")) { + this.replicationUnits(model.getReplicationUnits()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the source shard from which to move the chunks out to other shards. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceShardName") + private final String sourceShardName; + + /** + * The name of the source shard from which to move the chunks out to other shards. + * @return the value + **/ + public String getSourceShardName() { + return sourceShardName; + } + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationShardName") + private final String destinationShardName; + + /** + * The name of the destination shard to which the chunks moved out from source shard should be relocate to. + * @return the value + **/ + public String getDestinationShardName() { + return destinationShardName; + } + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationUnits") + private final java.util.List replicationUnits; + + /** + * For RAFT databases please provide replication unit numbers to be moved from source shard to destination shard. + * @return the value + **/ + public java.util.List getReplicationUnits() { + return replicationUnits; + } + + @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("MoveDistributedDatabaseReplicationUnitDetails("); + sb.append("super=").append(super.toString()); + sb.append("sourceShardName=").append(String.valueOf(this.sourceShardName)); + sb.append(", destinationShardName=").append(String.valueOf(this.destinationShardName)); + sb.append(", replicationUnits=").append(String.valueOf(this.replicationUnits)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MoveDistributedDatabaseReplicationUnitDetails)) { + return false; + } + + MoveDistributedDatabaseReplicationUnitDetails other = + (MoveDistributedDatabaseReplicationUnitDetails) o; + return java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.destinationShardName, other.destinationShardName) + && java.util.Objects.equals(this.replicationUnits, other.replicationUnits) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = + (result * PRIME) + + (this.destinationShardName == null + ? 43 + : this.destinationShardName.hashCode()); + result = + (result * PRIME) + + (this.replicationUnits == null ? 43 : this.replicationUnits.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationStatus.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationStatus.java new file mode 100644 index 0000000000..3139b9c4cd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Possible operation status. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + 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(OperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationStatus v : OperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationType.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationType.java new file mode 100644 index 0000000000..9d79aeea7c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/OperationType.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Possible operation types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum OperationType { + CreateDistributedDb("CREATE_DISTRIBUTED_DB"), + PatchDistributedDbInsertShards("PATCH_DISTRIBUTED_DB_INSERT_SHARDS"), + PatchDistributedDbRemoveShards("PATCH_DISTRIBUTED_DB_REMOVE_SHARDS"), + PatchDistributedDbMergeCatalogShards("PATCH_DISTRIBUTED_DB_MERGE_CATALOG_SHARDS"), + DeleteDistributedDb("DELETE_DISTRIBUTED_DB"), + ChangeDistributedDbCompartment("CHANGE_DISTRIBUTED_DB_COMPARTMENT"), + ConfigureDistributedDbGsms("CONFIGURE_DISTRIBUTED_DB_GSMS"), + ConfigureDistributedDbSharding("CONFIGURE_DISTRIBUTED_DB_SHARDING"), + RotateDistributedDbPasswords("ROTATE_DISTRIBUTED_DB_PASSWORDS"), + StartDistributedDb("START_DISTRIBUTED_DB"), + StopDistributedDb("STOP_DISTRIBUTED_DB"), + StartDistributedDbShard("START_DISTRIBUTED_DB_SHARD"), + StartDistributedDbCatalog("START_DISTRIBUTED_DB_CATALOG"), + StopDistributedDbShard("STOP_DISTRIBUTED_DB_SHARD"), + StopDistributedDbCatalog("STOP_DISTRIBUTED_DB_CATALOG"), + CreateDistributedDbShard("CREATE_DISTRIBUTED_DB_SHARD"), + CreateDistributedDbCatalog("CREATE_DISTRIBUTED_DB_CATALOG"), + CreateDistributedDbGsm("CREATE_DISTRIBUTED_DB_GSM"), + UpdateDistributedDbCatalogShards("UPDATE_DISTRIBUTED_DB_CATALOG_SHARDS"), + ValidateNetwork("VALIDATE_NETWORK"), + ExecuteValidateNetworkTests("EXECUTE_VALIDATE_NETWORK_TESTS"), + CreatePrivateEndpoint("CREATE_PRIVATE_ENDPOINT"), + DeletePrivateEndpoint("DELETE_PRIVATE_ENDPOINT"), + ChangePrivateEndpointCompartment("CHANGE_PRIVATE_ENDPOINT_COMPARTMENT"), + ReinstateProxyInstance("REINSTATE_PROXY_INSTANCE"), + DeleteDistributedDbShard("DELETE_DISTRIBUTED_DB_SHARD"), + DeleteDistributedDbCatalog("DELETE_DISTRIBUTED_DB_CATALOG"), + DeleteDistributedDbGsm("DELETE_DISTRIBUTED_DB_GSM"), + AddGdscontrolNode("ADD_GDSCONTROL_NODE"), + ChangeDistributedDbBackupConfig("CHANGE_DISTRIBUTED_DB_BACKUP_CONFIG"), + AddDistributedDbDgExadb("ADD_DISTRIBUTED_DB_DG_EXADB"), + AddDistributedDbDgAdb("ADD_DISTRIBUTED_DB_DG_ADB"), + RemoveDistributedDbDgAdb("REMOVE_DISTRIBUTED_DB_DG_ADB"), + RemoveDistributedDbDgExadb("REMOVE_DISTRIBUTED_DB_DG_EXADB"), + ConfigureDistributedDbGsmsWallet("CONFIGURE_DISTRIBUTED_DB_GSMS_WALLET"), + ValidateCaBundle("VALIDATE_CA_BUNDLE"), + RecreateFailedResource("RECREATE_FAILED_RESOURCE"), + MoveReplicationUnits("MOVE_REPLICATION_UNITS"), + + /** + * 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedAutonomousDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedAutonomousDatabaseDetails.java new file mode 100644 index 0000000000..cc79c107a4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedAutonomousDatabaseDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Provide PatchInstruction(s) in items array. All instructions in items have to be of same type. + * All instructions in items have to either PatchInsertInstruction type, PatchRemoveInstruction or + * PatchMergeInstruction. Multiple instructions of different types is not allowed to be performed in + * single 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchDistributedAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchDistributedAutonomousDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchDistributedAutonomousDatabaseDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of patch instructions. + * @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 PatchDistributedAutonomousDatabaseDetails build() { + PatchDistributedAutonomousDatabaseDetails model = + new PatchDistributedAutonomousDatabaseDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchDistributedAutonomousDatabaseDetails 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 patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of patch instructions. + * @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("PatchDistributedAutonomousDatabaseDetails("); + 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 PatchDistributedAutonomousDatabaseDetails)) { + return false; + } + + PatchDistributedAutonomousDatabaseDetails other = + (PatchDistributedAutonomousDatabaseDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabaseDetails.java new file mode 100644 index 0000000000..987efbbe24 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabaseDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Provide PatchInstuction(s) in items array. All instructions in items have to be of same type. + * All instructions in items have to either PatchInsertInstruction type, PatchRemoveInstruction or + * PatchMergeInstruction. Multiple instructions of different types is not allowed to be performed in + * single 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchDistributedDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchDistributedDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchDistributedDatabaseDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of patch instructions. + * @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 PatchDistributedDatabaseDetails build() { + PatchDistributedDatabaseDetails model = new PatchDistributedDatabaseDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchDistributedDatabaseDetails 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 patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of patch instructions. + * @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("PatchDistributedDatabaseDetails("); + 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 PatchDistributedDatabaseDetails)) { + return false; + } + + PatchDistributedDatabaseDetails other = (PatchDistributedDatabaseDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabasePrivateEndpointDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabasePrivateEndpointDetails.java new file mode 100644 index 0000000000..743de8ccf5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchDistributedDatabasePrivateEndpointDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Provide PatchInstruction(s) in items array. All instructions in items have to be of same type. + * The initial supported patch operation is MERGE with selection vcnNsgIds and value containing + * the vcnNsgIds payload. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchDistributedDatabasePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchDistributedDatabasePrivateEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchDistributedDatabasePrivateEndpointDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of patch instructions. + * @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 PatchDistributedDatabasePrivateEndpointDetails build() { + PatchDistributedDatabasePrivateEndpointDetails model = + new PatchDistributedDatabasePrivateEndpointDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchDistributedDatabasePrivateEndpointDetails 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 patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of patch instructions. + * @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("PatchDistributedDatabasePrivateEndpointDetails("); + 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 PatchDistributedDatabasePrivateEndpointDetails)) { + return false; + } + + PatchDistributedDatabasePrivateEndpointDetails other = + (PatchDistributedDatabasePrivateEndpointDetails) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInsertInstruction.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInsertInstruction.java new file mode 100644 index 0000000000..7f51c989dd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInsertInstruction.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchInsertInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchInsertInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be inserted into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be inserted into the target. + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchInsertInstruction build() { + PatchInsertInstruction model = new PatchInsertInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchInsertInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchInsertInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be inserted into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be inserted into the target. + * @return the value + **/ + public Object getValue() { + return value; + } + + @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("PatchInsertInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchInsertInstruction)) { + return false; + } + + PatchInsertInstruction other = (PatchInsertInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInstruction.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInstruction.java new file mode 100644 index 0000000000..13d01c4936 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchInstruction.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * A single instruction to be included as part of Patch request content. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation", + defaultImpl = PatchInstruction.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchRemoveInstruction.class, + name = "REMOVE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchInsertInstruction.class, + name = "INSERT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchMergeInstruction.class, + name = "MERGE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PatchInstruction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"selection"}) + protected PatchInstruction(String selection) { + super(); + this.selection = selection; + } + + /** + * The set of values to which the operation applies as a [JMESPath expression](https://jmespath.org/specification.html) for evaluation against the context resource. + * An operation fails if the selection yields an exception, except as otherwise specified. + * Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final String selection; + + /** + * The set of values to which the operation applies as a [JMESPath expression](https://jmespath.org/specification.html) for evaluation against the context resource. + * An operation fails if the selection yields an exception, except as otherwise specified. + * Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + * + * @return the value + **/ + public String getSelection() { + return selection; + } + + @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("PatchInstruction("); + sb.append("super=").append(super.toString()); + sb.append("selection=").append(String.valueOf(this.selection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchInstruction)) { + return false; + } + + PatchInstruction other = (PatchInstruction) o; + return java.util.Objects.equals(this.selection, other.selection) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The operation that need to be performed on an element inside list. + * + **/ + public enum Operation { + Insert("INSERT"), + Remove("REMOVE"), + Merge("MERGE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Operation v : Operation.values()) { + map.put(v.getValue(), v); + } + } + + Operation(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Operation create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Operation: " + key); + } + }; +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchMergeInstruction.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchMergeInstruction.java new file mode 100644 index 0000000000..d26b566d8a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchMergeInstruction.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * An operation that recursively updates items of the selection, or adding the value if the selection is empty. + * If the value is not an object, it is used directly, otherwise each key-value member is used + * to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value + * (similar to [RFC 7396](https://tools.ietf.org/html/rfc7396#section-2) JSON Merge Patch, except that null values are copied + * rather than transformed into deletions). + * NOT_FOUND exceptions are handled by creating the implied containing structure. + * To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchMergeInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchMergeInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be merged into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be merged into the target. + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchMergeInstruction build() { + PatchMergeInstruction model = new PatchMergeInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchMergeInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchMergeInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be merged into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be merged into the target. + * @return the value + **/ + public Object getValue() { + return value; + } + + @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("PatchMergeInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchMergeInstruction)) { + return false; + } + + PatchMergeInstruction other = (PatchMergeInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchRemoveInstruction.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchRemoveInstruction.java new file mode 100644 index 0000000000..e20cb94743 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/PatchRemoveInstruction.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * An operation that deletes items, ignoring NOT_FOUND exceptions. + * To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchRemoveInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchRemoveInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchRemoveInstruction build() { + PatchRemoveInstruction model = new PatchRemoveInstruction(this.selection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchRemoveInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchRemoveInstruction(String selection) { + super(selection); + } + + @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("PatchRemoveInstruction("); + 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 PatchRemoveInstruction)) { + return false; + } + + PatchRemoveInstruction other = (PatchRemoveInstruction) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabaseDetails.java new file mode 100644 index 0000000000..a19d947fc8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabaseDetails.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details to rotate password for a shard or catalog in the Globally distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateDistributedAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateDistributedAutonomousDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + public RotateDistributedAutonomousDatabaseDetails(String name, String adminPassword) { + super(); + this.name = name; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + @java.beans.ConstructorProperties({"name", "adminPassword"}) + public RotateDistributedAutonomousDatabaseDetails(String name, char[] adminPassword) { + super(); + this.name = name; + this.adminPassword = adminPassword; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The shard or catalog name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The shard or catalog name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The admin password for the shard or catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard or catalog. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateDistributedAutonomousDatabaseDetails build() { + RotateDistributedAutonomousDatabaseDetails model = + new RotateDistributedAutonomousDatabaseDetails(this.name, this.adminPassword); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateDistributedAutonomousDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The shard or catalog name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The shard or catalog name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The admin password for the shard or catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard or catalog. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard or catalog. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + @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("RotateDistributedAutonomousDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", adminPassword=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedAutonomousDatabaseDetails)) { + return false; + } + + RotateDistributedAutonomousDatabaseDetails other = + (RotateDistributedAutonomousDatabaseDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && 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.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabasePasswordsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabasePasswordsDetails.java new file mode 100644 index 0000000000..ef99aef18b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedAutonomousDatabasePasswordsDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Payload to rotate passwords for shards and catalogs in the Globally distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateDistributedAutonomousDatabasePasswordsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateDistributedAutonomousDatabasePasswordsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"databaseDetails"}) + public RotateDistributedAutonomousDatabasePasswordsDetails( + java.util.List databaseDetails) { + super(); + this.databaseDetails = databaseDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of shard or catalog password rotation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDetails") + private java.util.List databaseDetails; + + /** + * Collection of shard or catalog password rotation details. + * @param databaseDetails the value to set + * @return this builder + **/ + public Builder databaseDetails( + java.util.List databaseDetails) { + this.databaseDetails = databaseDetails; + this.__explicitlySet__.add("databaseDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateDistributedAutonomousDatabasePasswordsDetails build() { + RotateDistributedAutonomousDatabasePasswordsDetails model = + new RotateDistributedAutonomousDatabasePasswordsDetails(this.databaseDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateDistributedAutonomousDatabasePasswordsDetails model) { + if (model.wasPropertyExplicitlySet("databaseDetails")) { + this.databaseDetails(model.getDatabaseDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Collection of shard or catalog password rotation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDetails") + private final java.util.List databaseDetails; + + /** + * Collection of shard or catalog password rotation details. + * @return the value + **/ + public java.util.List getDatabaseDetails() { + return databaseDetails; + } + + @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("RotateDistributedAutonomousDatabasePasswordsDetails("); + sb.append("super=").append(super.toString()); + sb.append("databaseDetails=").append(String.valueOf(this.databaseDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedAutonomousDatabasePasswordsDetails)) { + return false; + } + + RotateDistributedAutonomousDatabasePasswordsDetails other = + (RotateDistributedAutonomousDatabasePasswordsDetails) o; + return java.util.Objects.equals(this.databaseDetails, other.databaseDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.databaseDetails == null ? 43 : this.databaseDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabaseDetails.java new file mode 100644 index 0000000000..beab9e429d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabaseDetails.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details to rotate password for a shard or catalog in the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateDistributedDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateDistributedDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + public RotateDistributedDatabaseDetails(String name, String adminPassword) { + super(); + this.name = name; + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + } + + @com.fasterxml.jackson.annotation.JsonCreator + @Deprecated + @java.beans.ConstructorProperties({"name", "adminPassword"}) + public RotateDistributedDatabaseDetails(String name, char[] adminPassword) { + super(); + this.name = name; + this.adminPassword = adminPassword; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The shard or catalog name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The shard or catalog name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The admin password for the shard or catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private char[] adminPassword; + + /** + * The admin password for the shard or catalog. + * @param adminPassword the value to set + * @return this builder + **/ + public Builder adminPassword(char[] adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword != null ? adminPassword.toCharArray() : null; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateDistributedDatabaseDetails build() { + RotateDistributedDatabaseDetails model = + new RotateDistributedDatabaseDetails(this.name, this.adminPassword); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateDistributedDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The shard or catalog name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The shard or catalog name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The admin password for the shard or catalog. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private final char[] adminPassword; + + /** + * The admin password for the shard or catalog. + * return the value + * @Deprecated - Use getAdminPassword__AsCharArray() instead. + */ + @Deprecated + @com.fasterxml.jackson.annotation.JsonIgnore + public String getAdminPassword() { + return adminPassword != null ? new String(adminPassword) : null; + } + + /** + * The admin password for the shard or catalog. + * @return the value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + public char[] getAdminPassword__AsCharArray() { + return adminPassword; + } + + @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("RotateDistributedDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", adminPassword=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedDatabaseDetails)) { + return false; + } + + RotateDistributedDatabaseDetails other = (RotateDistributedDatabaseDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.adminPassword, other.adminPassword) + && 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.adminPassword == null ? 43 : this.adminPassword.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabasePasswordsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabasePasswordsDetails.java new file mode 100644 index 0000000000..761e33a872 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/RotateDistributedDatabasePasswordsDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Payload to rotate passwords for shards and catalogs in the Globally distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateDistributedDatabasePasswordsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateDistributedDatabasePasswordsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"databaseDetails"}) + public RotateDistributedDatabasePasswordsDetails( + java.util.List databaseDetails) { + super(); + this.databaseDetails = databaseDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of shard or catalog password rotation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDetails") + private java.util.List databaseDetails; + + /** + * Collection of shard or catalog password rotation details. + * @param databaseDetails the value to set + * @return this builder + **/ + public Builder databaseDetails( + java.util.List databaseDetails) { + this.databaseDetails = databaseDetails; + this.__explicitlySet__.add("databaseDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateDistributedDatabasePasswordsDetails build() { + RotateDistributedDatabasePasswordsDetails model = + new RotateDistributedDatabasePasswordsDetails(this.databaseDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateDistributedDatabasePasswordsDetails model) { + if (model.wasPropertyExplicitlySet("databaseDetails")) { + this.databaseDetails(model.getDatabaseDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Collection of shard or catalog password rotation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDetails") + private final java.util.List databaseDetails; + + /** + * Collection of shard or catalog password rotation details. + * @return the value + **/ + public java.util.List getDatabaseDetails() { + return databaseDetails; + } + + @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("RotateDistributedDatabasePasswordsDetails("); + sb.append("super=").append(super.toString()); + sb.append("databaseDetails=").append(String.valueOf(this.databaseDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedDatabasePasswordsDetails)) { + return false; + } + + RotateDistributedDatabasePasswordsDetails other = + (RotateDistributedDatabasePasswordsDetails) o; + return java.util.Objects.equals(this.databaseDetails, other.databaseDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.databaseDetails == null ? 43 : this.databaseDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedAutonomousDatabaseGsmsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedAutonomousDatabaseGsmsDetails.java new file mode 100644 index 0000000000..12469ba1a7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedAutonomousDatabaseGsmsDetails.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Empty payload to scale global service manager(GSM) instances for the distributed autonomous database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScaleDistributedAutonomousDatabaseGsmsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScaleDistributedAutonomousDatabaseGsmsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + public ScaleDistributedAutonomousDatabaseGsmsDetails() { + super(); + } + + @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 ScaleDistributedAutonomousDatabaseGsmsDetails build() { + ScaleDistributedAutonomousDatabaseGsmsDetails model = + new ScaleDistributedAutonomousDatabaseGsmsDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScaleDistributedAutonomousDatabaseGsmsDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @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("ScaleDistributedAutonomousDatabaseGsmsDetails("); + 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 ScaleDistributedAutonomousDatabaseGsmsDetails)) { + return false; + } + + ScaleDistributedAutonomousDatabaseGsmsDetails other = + (ScaleDistributedAutonomousDatabaseGsmsDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedDatabaseGsmsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedDatabaseGsmsDetails.java new file mode 100644 index 0000000000..9873204841 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/ScaleDistributedDatabaseGsmsDetails.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Empty payload to scale global service manager(GSM) instances for the distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScaleDistributedDatabaseGsmsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScaleDistributedDatabaseGsmsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + public ScaleDistributedDatabaseGsmsDetails() { + super(); + } + + @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 ScaleDistributedDatabaseGsmsDetails build() { + ScaleDistributedDatabaseGsmsDetails model = new ScaleDistributedDatabaseGsmsDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScaleDistributedDatabaseGsmsDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @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("ScaleDistributedDatabaseGsmsDetails("); + 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 ScaleDistributedDatabaseGsmsDetails)) { + return false; + } + + ScaleDistributedDatabaseGsmsDetails other = (ScaleDistributedDatabaseGsmsDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SortOrder.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SortOrder.java new file mode 100644 index 0000000000..6c018e0bc9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SortOrder.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Sort orders. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum SortOrder { + 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardDatabase.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardDatabase.java new file mode 100644 index 0000000000..d1ca660510 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardDatabase.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * System data guard shard database details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SystemDataGuardDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SystemDataGuardDatabase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"originalReplica", "dataGuardReplicas"}) + public SystemDataGuardDatabase( + SystemDataGuardReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private SystemDataGuardReplica originalReplica; + + public Builder originalReplica(SystemDataGuardReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The system data guard replica details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The system data guard replica details. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas(java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SystemDataGuardDatabase build() { + SystemDataGuardDatabase model = + new SystemDataGuardDatabase(this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SystemDataGuardDatabase model) { + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final SystemDataGuardReplica originalReplica; + + public SystemDataGuardReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The system data guard replica details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The system data guard replica details. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("SystemDataGuardDatabase("); + sb.append("super=").append(super.toString()); + sb.append("originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SystemDataGuardDatabase)) { + return false; + } + + SystemDataGuardDatabase other = (SystemDataGuardDatabase) o; + return java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardReplica.java new file mode 100644 index 0000000000..b0041a40af --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemDataGuardReplica.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * System data guard replica details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SystemDataGuardReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SystemDataGuardReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "databases"}) + public SystemDataGuardReplica( + String name, java.util.List databases) { + super(); + this.name = name; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @param databases the value to set + * @return this builder + **/ + public Builder databases(java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SystemDataGuardReplica build() { + SystemDataGuardReplica model = new SystemDataGuardReplica(this.name, this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SystemDataGuardReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of data guard replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Details of the databases associated with the system data guard replica. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system data guard replica. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("SystemDataGuardReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SystemDataGuardReplica)) { + return false; + } + + SystemDataGuardReplica other = (SystemDataGuardReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.databases, other.databases) + && 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.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemRaftCluster.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemRaftCluster.java new file mode 100644 index 0000000000..bc7b857ed8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/SystemRaftCluster.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * System raft cluster definition. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SystemRaftCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SystemRaftCluster extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "replicationFactor", + "witnessCount", + "ruMode", + "databases" + }) + public SystemRaftCluster( + String name, + Integer replicationFactor, + Integer witnessCount, + RuMode ruMode, + java.util.List databases) { + super(); + this.name = name; + this.replicationFactor = replicationFactor; + this.witnessCount = witnessCount; + this.ruMode = ruMode; + this.databases = databases; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @param replicationFactor the value to set + * @return this builder + **/ + public Builder replicationFactor(Integer replicationFactor) { + this.replicationFactor = replicationFactor; + this.__explicitlySet__.add("replicationFactor"); + return this; + } + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @param witnessCount the value to set + * @return this builder + **/ + public Builder witnessCount(Integer witnessCount) { + this.witnessCount = witnessCount; + this.__explicitlySet__.add("witnessCount"); + return this; + } + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @param ruMode the value to set + * @return this builder + **/ + public Builder ruMode(RuMode ruMode) { + this.ruMode = ruMode; + this.__explicitlySet__.add("ruMode"); + return this; + } + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @param databases the value to set + * @return this builder + **/ + public Builder databases(java.util.List databases) { + this.databases = databases; + this.__explicitlySet__.add("databases"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SystemRaftCluster build() { + SystemRaftCluster model = + new SystemRaftCluster( + this.name, + this.replicationFactor, + this.witnessCount, + this.ruMode, + this.databases); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SystemRaftCluster model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("replicationFactor")) { + this.replicationFactor(model.getReplicationFactor()); + } + if (model.wasPropertyExplicitlySet("witnessCount")) { + this.witnessCount(model.getWitnessCount()); + } + if (model.wasPropertyExplicitlySet("ruMode")) { + this.ruMode(model.getRuMode()); + } + if (model.wasPropertyExplicitlySet("databases")) { + this.databases(model.getDatabases()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of raft cluster. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationFactor") + private final Integer replicationFactor; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public Integer getReplicationFactor() { + return replicationFactor; + } + + /** + * Witnesses RU count associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("witnessCount") + private final Integer witnessCount; + + /** + * Witnesses RU count associated with the raft cluster. + * @return the value + **/ + public Integer getWitnessCount() { + return witnessCount; + } + + /** + * Replication factor associated with the raft cluster. + **/ + public enum RuMode { + ReadOnly("READ_ONLY"), + ReadWrite("READ_WRITE"), + + /** + * 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(RuMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RuMode v : RuMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RuMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RuMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RuMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Replication factor associated with the raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruMode") + private final RuMode ruMode; + + /** + * Replication factor associated with the raft cluster. + * @return the value + **/ + public RuMode getRuMode() { + return ruMode; + } + + /** + * Details of the databases associated with the system raft cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databases") + private final java.util.List databases; + + /** + * Details of the databases associated with the system raft cluster. + * @return the value + **/ + public java.util.List getDatabases() { + return databases; + } + + @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("SystemRaftCluster("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", replicationFactor=").append(String.valueOf(this.replicationFactor)); + sb.append(", witnessCount=").append(String.valueOf(this.witnessCount)); + sb.append(", ruMode=").append(String.valueOf(this.ruMode)); + sb.append(", databases=").append(String.valueOf(this.databases)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SystemRaftCluster)) { + return false; + } + + SystemRaftCluster other = (SystemRaftCluster) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.replicationFactor, other.replicationFactor) + && java.util.Objects.equals(this.witnessCount, other.witnessCount) + && java.util.Objects.equals(this.ruMode, other.ruMode) + && java.util.Objects.equals(this.databases, other.databases) + && 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.replicationFactor == null ? 43 : this.replicationFactor.hashCode()); + result = (result * PRIME) + (this.witnessCount == null ? 43 : this.witnessCount.hashCode()); + result = (result * PRIME) + (this.ruMode == null ? 43 : this.ruMode.hashCode()); + result = (result * PRIME) + (this.databases == null ? 43 : this.databases.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedAutonomousDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedAutonomousDatabaseDetails.java new file mode 100644 index 0000000000..3df8d1fcbd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedAutonomousDatabaseDetails.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The details of Globally distributed autonomous database 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDistributedAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDistributedAutonomousDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "notificationTopicIds", + "freeformTags", + "definedTags" + }) + public UpdateDistributedAutonomousDatabaseDetails( + String displayName, + java.util.List notificationTopicIds, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.notificationTopicIds = notificationTopicIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name of the Globally distributed autonomous database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 UpdateDistributedAutonomousDatabaseDetails build() { + UpdateDistributedAutonomousDatabaseDetails model = + new UpdateDistributedAutonomousDatabaseDetails( + this.displayName, + this.notificationTopicIds, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDistributedAutonomousDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + 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); + } + + /** + * Display name of the Globally distributed autonomous database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name of the Globally distributed autonomous database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed autonomous database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("UpdateDistributedAutonomousDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + 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 UpdateDistributedAutonomousDatabaseDetails)) { + return false; + } + + UpdateDistributedAutonomousDatabaseDetails other = + (UpdateDistributedAutonomousDatabaseDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabaseDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabaseDetails.java new file mode 100644 index 0000000000..2cad304e98 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabaseDetails.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The details of Globally distributed database 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDistributedDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDistributedDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "notificationTopicIds", + "freeformTags", + "definedTags" + }) + public UpdateDistributedDatabaseDetails( + String displayName, + java.util.List notificationTopicIds, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.notificationTopicIds = notificationTopicIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name of the Globally distributed database. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + * @param notificationTopicIds the value to set + * @return this builder + **/ + public Builder notificationTopicIds(java.util.List notificationTopicIds) { + this.notificationTopicIds = notificationTopicIds; + this.__explicitlySet__.add("notificationTopicIds"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 UpdateDistributedDatabaseDetails build() { + UpdateDistributedDatabaseDetails model = + new UpdateDistributedDatabaseDetails( + this.displayName, + this.notificationTopicIds, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDistributedDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("notificationTopicIds")) { + this.notificationTopicIds(model.getNotificationTopicIds()); + } + 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); + } + + /** + * Display name of the Globally distributed database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name of the Globally distributed database. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicIds") + private final java.util.List notificationTopicIds; + + /** + * The collection of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the notification topics associated with the globally distributed database. + * Pass an empty list ({@code []}) to remove existing notification topics (set {@code notificationTopicIds} to empty). + * + * @return the value + **/ + public java.util.List getNotificationTopicIds() { + return notificationTopicIds; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("UpdateDistributedDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", notificationTopicIds=").append(String.valueOf(this.notificationTopicIds)); + 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 UpdateDistributedDatabaseDetails)) { + return false; + } + + UpdateDistributedDatabaseDetails other = (UpdateDistributedDatabaseDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.notificationTopicIds, other.notificationTopicIds) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicIds == null + ? 43 + : this.notificationTopicIds.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabasePrivateEndpointDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabasePrivateEndpointDetails.java new file mode 100644 index 0000000000..7125e911a2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UpdateDistributedDatabasePrivateEndpointDetails.java @@ -0,0 +1,274 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * The details of private endpoint 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDistributedDatabasePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDistributedDatabasePrivateEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description", "freeformTags", "definedTags"}) + public UpdateDistributedDatabasePrivateEndpointDetails( + String displayName, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Display name for DistributedDatabasePrivateEndpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name for DistributedDatabasePrivateEndpoint + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 UpdateDistributedDatabasePrivateEndpointDetails build() { + UpdateDistributedDatabasePrivateEndpointDetails model = + new UpdateDistributedDatabasePrivateEndpointDetails( + this.displayName, + this.description, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDistributedDatabasePrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + 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); + } + + /** + * Display name for DistributedDatabasePrivateEndpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name for DistributedDatabasePrivateEndpoint + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * DistributedDatabasePrivateEndpoint description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * DistributedDatabasePrivateEndpoint description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("UpdateDistributedDatabasePrivateEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + 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 UpdateDistributedDatabasePrivateEndpointDetails)) { + return false; + } + + UpdateDistributedDatabasePrivateEndpointDetails other = + (UpdateDistributedDatabasePrivateEndpointDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && 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.displayName == null ? 43 : this.displayName.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpace.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpace.java new file mode 100644 index 0000000000..de4277fdd7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpace.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Distributed database user shard space details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = UserShardSpace.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UserShardSpace extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "originalReplica", "dataGuardReplicas"}) + public UserShardSpace( + String name, + UserShardSpaceReplica originalReplica, + java.util.List dataGuardReplicas) { + super(); + this.name = name; + this.originalReplica = originalReplica; + this.dataGuardReplicas = dataGuardReplicas; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private UserShardSpaceReplica originalReplica; + + public Builder originalReplica(UserShardSpaceReplica originalReplica) { + this.originalReplica = originalReplica; + this.__explicitlySet__.add("originalReplica"); + return this; + } + /** + * The details of data guard replica for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private java.util.List dataGuardReplicas; + + /** + * The details of data guard replica for the user shard space. + * @param dataGuardReplicas the value to set + * @return this builder + **/ + public Builder dataGuardReplicas(java.util.List dataGuardReplicas) { + this.dataGuardReplicas = dataGuardReplicas; + this.__explicitlySet__.add("dataGuardReplicas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UserShardSpace build() { + UserShardSpace model = + new UserShardSpace(this.name, this.originalReplica, this.dataGuardReplicas); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UserShardSpace model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("originalReplica")) { + this.originalReplica(model.getOriginalReplica()); + } + if (model.wasPropertyExplicitlySet("dataGuardReplicas")) { + this.dataGuardReplicas(model.getDataGuardReplicas()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of user shard space. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originalReplica") + private final UserShardSpaceReplica originalReplica; + + public UserShardSpaceReplica getOriginalReplica() { + return originalReplica; + } + + /** + * The details of data guard replica for the user shard space. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataGuardReplicas") + private final java.util.List dataGuardReplicas; + + /** + * The details of data guard replica for the user shard space. + * @return the value + **/ + public java.util.List getDataGuardReplicas() { + return dataGuardReplicas; + } + + @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("UserShardSpace("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", originalReplica=").append(String.valueOf(this.originalReplica)); + sb.append(", dataGuardReplicas=").append(String.valueOf(this.dataGuardReplicas)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UserShardSpace)) { + return false; + } + + UserShardSpace other = (UserShardSpace) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.originalReplica, other.originalReplica) + && java.util.Objects.equals(this.dataGuardReplicas, other.dataGuardReplicas) + && 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.originalReplica == null ? 43 : this.originalReplica.hashCode()); + result = + (result * PRIME) + + (this.dataGuardReplicas == null ? 43 : this.dataGuardReplicas.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpaceReplica.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpaceReplica.java new file mode 100644 index 0000000000..a53309604f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/UserShardSpaceReplica.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of user shard space. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UserShardSpaceReplica.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UserShardSpaceReplica + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "database"}) + public UserShardSpaceReplica(String name, DistributedDatabaseShardDatabase database) { + super(); + this.name = name; + this.database = database; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private DistributedDatabaseShardDatabase database; + + public Builder database(DistributedDatabaseShardDatabase database) { + this.database = database; + this.__explicitlySet__.add("database"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UserShardSpaceReplica build() { + UserShardSpaceReplica model = new UserShardSpaceReplica(this.name, this.database); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UserShardSpaceReplica model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("database")) { + this.database(model.getDatabase()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of user shard space replica. + * It must start with a letter and contain only letters, digits, and underscores. + * Maximum length is 40 characters. + * + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("database") + private final DistributedDatabaseShardDatabase database; + + public DistributedDatabaseShardDatabase getDatabase() { + return database; + } + + @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("UserShardSpaceReplica("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", database=").append(String.valueOf(this.database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UserShardSpaceReplica)) { + return false; + } + + UserShardSpaceReplica other = (UserShardSpaceReplica) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.database, other.database) + && 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.database == null ? 43 : this.database.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VcnNsgIdsDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VcnNsgIdsDetails.java new file mode 100644 index 0000000000..5e0051152d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VcnNsgIdsDetails.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Specifies the Virtual Cloud Network (VCN) and the list of associated Network Security Group (NSG) OCIDs. + *

+ * This model is shared across create (POST), update (PUT/PATCH), and retrieve (GET) operations. + *

+ * - During create, {@code nsgIds} (if provided) specifies the NSGs to associate with the new resource. + * - During update or patch, {@code nsgIds} modifies the associations: provide an empty array ({@code []}) to clear all NSGs, or provide a new list to replace them. + * - GET responses return the current associations (which may be empty). + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = VcnNsgIdsDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VcnNsgIdsDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"vcnId", "nsgIds"}) + public VcnNsgIdsDetails(String vcnId, java.util.List nsgIds) { + super(); + this.vcnId = vcnId; + this.nsgIds = nsgIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer Virtual Cloud Network. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer Virtual Cloud Network. + * @param vcnId the value to set + * @return this builder + **/ + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) associated with resources in this VCN. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) associated with resources in this VCN. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VcnNsgIdsDetails build() { + VcnNsgIdsDetails model = new VcnNsgIdsDetails(this.vcnId, this.nsgIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VcnNsgIdsDetails model) { + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer Virtual Cloud Network. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer Virtual Cloud Network. + * @return the value + **/ + public String getVcnId() { + return vcnId; + } + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) associated with resources in this VCN. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) associated with resources in this VCN. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + @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("VcnNsgIdsDetails("); + sb.append("super=").append(super.toString()); + sb.append("vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VcnNsgIdsDetails)) { + return false; + } + + VcnNsgIdsDetails other = (VcnNsgIdsDetails) o; + return java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VmClusterDetails.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VmClusterDetails.java new file mode 100644 index 0000000000..d9517f3672 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/VmClusterDetails.java @@ -0,0 +1,927 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Details of the request to create exadb vm cluster for shard or catalog of the distributed database. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = VmClusterDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VmClusterDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "subnetId", + "backupSubnetId", + "enabledECpuCount", + "totalECpuCount", + "vmFileSystemStorageSize", + "sshPublicKeys", + "licenseModel", + "domain", + "privateZoneId", + "isDiagnosticsEventsEnabled", + "isHealthMonitoringEnabled", + "isIncidentLogsEnabled", + "nsgIds", + "backupNetworkNsgIds", + "subscriptionId" + }) + public VmClusterDetails( + String compartmentId, + String subnetId, + String backupSubnetId, + Integer enabledECpuCount, + Integer totalECpuCount, + Integer vmFileSystemStorageSize, + java.util.List sshPublicKeys, + LicenseModel licenseModel, + String domain, + String privateZoneId, + Boolean isDiagnosticsEventsEnabled, + Boolean isHealthMonitoringEnabled, + Boolean isIncidentLogsEnabled, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + String subscriptionId) { + super(); + this.compartmentId = compartmentId; + this.subnetId = subnetId; + this.backupSubnetId = backupSubnetId; + this.enabledECpuCount = enabledECpuCount; + this.totalECpuCount = totalECpuCount; + this.vmFileSystemStorageSize = vmFileSystemStorageSize; + this.sshPublicKeys = sshPublicKeys; + this.licenseModel = licenseModel; + this.domain = domain; + this.privateZoneId = privateZoneId; + this.isDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + this.isHealthMonitoringEnabled = isHealthMonitoringEnabled; + this.isIncidentLogsEnabled = isIncidentLogsEnabled; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.subscriptionId = subscriptionId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + * @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](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private String backupSubnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param backupSubnetId the value to set + * @return this builder + **/ + public Builder backupSubnetId(String backupSubnetId) { + this.backupSubnetId = backupSubnetId; + this.__explicitlySet__.add("backupSubnetId"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorageSize") + private Integer vmFileSystemStorageSize; + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + * @param vmFileSystemStorageSize the value to set + * @return this builder + **/ + public Builder vmFileSystemStorageSize(Integer vmFileSystemStorageSize) { + this.vmFileSystemStorageSize = vmFileSystemStorageSize; + this.__explicitlySet__.add("vmFileSystemStorageSize"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @param privateZoneId the value to set + * @return this builder + **/ + public Builder privateZoneId(String privateZoneId) { + this.privateZoneId = privateZoneId; + this.__explicitlySet__.add("privateZoneId"); + return this; + } + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiagnosticsEventsEnabled") + private Boolean isDiagnosticsEventsEnabled; + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + * @param isDiagnosticsEventsEnabled the value to set + * @return this builder + **/ + public Builder isDiagnosticsEventsEnabled(Boolean isDiagnosticsEventsEnabled) { + this.isDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + this.__explicitlySet__.add("isDiagnosticsEventsEnabled"); + return this; + } + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHealthMonitoringEnabled") + private Boolean isHealthMonitoringEnabled; + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + * @param isHealthMonitoringEnabled the value to set + * @return this builder + **/ + public Builder isHealthMonitoringEnabled(Boolean isHealthMonitoringEnabled) { + this.isHealthMonitoringEnabled = isHealthMonitoringEnabled; + this.__explicitlySet__.add("isHealthMonitoringEnabled"); + return this; + } + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIncidentLogsEnabled") + private Boolean isIncidentLogsEnabled; + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + * @param isIncidentLogsEnabled the value to set + * @return this builder + **/ + public Builder isIncidentLogsEnabled(Boolean isIncidentLogsEnabled) { + this.isIncidentLogsEnabled = isIncidentLogsEnabled; + this.__explicitlySet__.add("isIncidentLogsEnabled"); + return this; + } + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VmClusterDetails build() { + VmClusterDetails model = + new VmClusterDetails( + this.compartmentId, + this.subnetId, + this.backupSubnetId, + this.enabledECpuCount, + this.totalECpuCount, + this.vmFileSystemStorageSize, + this.sshPublicKeys, + this.licenseModel, + this.domain, + this.privateZoneId, + this.isDiagnosticsEventsEnabled, + this.isHealthMonitoringEnabled, + this.isIncidentLogsEnabled, + this.nsgIds, + this.backupNetworkNsgIds, + this.subscriptionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VmClusterDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("backupSubnetId")) { + this.backupSubnetId(model.getBackupSubnetId()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorageSize")) { + this.vmFileSystemStorageSize(model.getVmFileSystemStorageSize()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("privateZoneId")) { + this.privateZoneId(model.getPrivateZoneId()); + } + if (model.wasPropertyExplicitlySet("isDiagnosticsEventsEnabled")) { + this.isDiagnosticsEventsEnabled(model.getIsDiagnosticsEventsEnabled()); + } + if (model.wasPropertyExplicitlySet("isHealthMonitoringEnabled")) { + this.isHealthMonitoringEnabled(model.getIsHealthMonitoringEnabled()); + } + if (model.wasPropertyExplicitlySet("isIncidentLogsEnabled")) { + this.isIncidentLogsEnabled(model.getIsIncidentLogsEnabled()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + 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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for VM Cluster. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private final String backupSubnetId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getBackupSubnetId() { + return backupSubnetId; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorageSize") + private final Integer vmFileSystemStorageSize; + + /** + * File System Storage Size in GBs for Exadata VM cluster. + * + * @return the value + **/ + public Integer getVmFileSystemStorageSize() { + return vmFileSystemStorageSize; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * If the Oracle-provided internet and VCN resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. + * Hyphens (-) are not permitted. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private final String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @return the value + **/ + public String getPrivateZoneId() { + return privateZoneId; + } + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiagnosticsEventsEnabled") + private final Boolean isDiagnosticsEventsEnabled; + + /** + * Indicates whether diagnostic collection is enabled for the VM cluster. + * Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. + * Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. + * You can enable diagnostic collection during VM cluster provisioning. You can also disable or enable it at any time using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsDiagnosticsEventsEnabled() { + return isDiagnosticsEventsEnabled; + } + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHealthMonitoringEnabled") + private final Boolean isHealthMonitoringEnabled; + + /** + * Indicates whether health monitoring is enabled for the VM cluster. + * Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. + * You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. + * Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsHealthMonitoringEnabled() { + return isHealthMonitoringEnabled; + } + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIncidentLogsEnabled") + private final Boolean isIncidentLogsEnabled; + + /** + * Indicates whether incident logs and trace collection are enabled for the VM cluster. + * Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. + * Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the {@code UpdateVmCluster} API. + * + * @return the value + **/ + public Boolean getIsIncidentLogsEnabled() { + return isIncidentLogsEnabled; + } + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. + * Setting this to an empty list removes all resources from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. + * Setting this to an empty array after the list is created removes the resource from all NSGs. + * For more information about NSGs, see [Security Rules](https://docs.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + @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("VmClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", vmFileSystemStorageSize=") + .append(String.valueOf(this.vmFileSystemStorageSize)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", privateZoneId=").append(String.valueOf(this.privateZoneId)); + sb.append(", isDiagnosticsEventsEnabled=") + .append(String.valueOf(this.isDiagnosticsEventsEnabled)); + sb.append(", isHealthMonitoringEnabled=") + .append(String.valueOf(this.isHealthMonitoringEnabled)); + sb.append(", isIncidentLogsEnabled=").append(String.valueOf(this.isIncidentLogsEnabled)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VmClusterDetails)) { + return false; + } + + VmClusterDetails other = (VmClusterDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals( + this.vmFileSystemStorageSize, other.vmFileSystemStorageSize) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.privateZoneId, other.privateZoneId) + && java.util.Objects.equals( + this.isDiagnosticsEventsEnabled, other.isDiagnosticsEventsEnabled) + && java.util.Objects.equals( + this.isHealthMonitoringEnabled, other.isHealthMonitoringEnabled) + && java.util.Objects.equals(this.isIncidentLogsEnabled, other.isIncidentLogsEnabled) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && 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.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.backupSubnetId == null ? 43 : this.backupSubnetId.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorageSize == null + ? 43 + : this.vmFileSystemStorageSize.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = + (result * PRIME) + + (this.privateZoneId == null ? 43 : this.privateZoneId.hashCode()); + result = + (result * PRIME) + + (this.isDiagnosticsEventsEnabled == null + ? 43 + : this.isDiagnosticsEventsEnabled.hashCode()); + result = + (result * PRIME) + + (this.isHealthMonitoringEnabled == null + ? 43 + : this.isHealthMonitoringEnabled.hashCode()); + result = + (result * PRIME) + + (this.isIncidentLogsEnabled == null + ? 43 + : this.isIncidentLogsEnabled.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequest.java new file mode 100644 index 0000000000..1bb8587faf --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequest.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * A description of workrequest status + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished" + }) + public WorkRequest( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished) { + 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; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the 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; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id 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 of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources 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; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @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 request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @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 request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @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 object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [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; + } + + @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); + 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()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [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 object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + @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(")"); + 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) + && 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) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestError.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestError.java new file mode 100644 index 0000000000..1182d7630b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestError.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * An error encountered while executing 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.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 occured. Error codes are listed on + * (https://docs.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 occured. Error codes are listed on + * (https://docs.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 description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human readable description of the issue encountered. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @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 occured. Error codes are listed on + * (https://docs.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 occured. Error codes are listed on + * (https://docs.oracle.com/iaas/Content/API/References/apierrors.htm) + * + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human readable description of the issue encountered. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestErrorCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestErrorCollection.java new file mode 100644 index 0000000000..0b622e6f1e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Results of a workRequestError search. Contains both WorkRequestError 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.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 { + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestError objects. + * @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); + } + + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestError objects. + * @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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntry.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntry.java new file mode 100644 index 0000000000..910a395eed --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntry.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * A log message from the execution of 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.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 { + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * 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 time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @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); + } + + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * Human-readable log message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntryCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntryCollection.java new file mode 100644 index 0000000000..c7c37f76cd --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Results of a workRequestLog search. Contains both workRequestLog 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.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 { + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestLogEntries. + * @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); + } + + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestLogEntries. + * @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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResource.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResource.java new file mode 100644 index 0000000000..22a4dfad83 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.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 the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type 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 work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * The identifier of the resource 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 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; + } + /** + * 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 the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type the work request affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * The identifier of the resource the work request affects. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * 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; + } + + /** + * 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResourceMetadataKey.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 0000000000..3a18b8d5f6 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Possible Metadata keys for workRequest resource metadata + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public enum WorkRequestResourceMetadataKey { + 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummary.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummary.java new file mode 100644 index 0000000000..a5593b9d6f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummary.java @@ -0,0 +1,502 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * A summary of the status of 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished" + }) + public WorkRequestSummary( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished) { + 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; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the 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; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id 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 of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources 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; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @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 request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @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 request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @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 object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [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; + } + + @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); + 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()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [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 object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + @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(")"); + 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) + && 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) + super.hashCode(); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummaryCollection.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummaryCollection.java new file mode 100644 index 0000000000..6cb61bd488 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.model; + +/** + * Results of a workRequest search. Contains both WorkRequest 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.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 { + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestSummary objects. + * @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); + } + + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestSummary objects. + * @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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedAutonomousDatabaseGdsControlNodeRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedAutonomousDatabaseGdsControlNodeRequest.java new file mode 100644 index 0000000000..0363d50455 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedAutonomousDatabaseGdsControlNodeRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use AddDistributedAutonomousDatabaseGdsControlNodeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedAutonomousDatabaseGdsControlNodeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed autonomous database. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + addDistributedAutonomousDatabaseGdsControlNodeDetails; + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed autonomous database. + * + */ + public com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + getAddDistributedAutonomousDatabaseGdsControlNodeDetails() { + return addDistributedAutonomousDatabaseGdsControlNodeDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + getBody$() { + return addDistributedAutonomousDatabaseGdsControlNodeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddDistributedAutonomousDatabaseGdsControlNodeRequest, + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed autonomous database. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + addDistributedAutonomousDatabaseGdsControlNodeDetails = null; + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed autonomous database. + * + * @param addDistributedAutonomousDatabaseGdsControlNodeDetails the value to set + * @return this builder instance + */ + public Builder addDistributedAutonomousDatabaseGdsControlNodeDetails( + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + addDistributedAutonomousDatabaseGdsControlNodeDetails) { + this.addDistributedAutonomousDatabaseGdsControlNodeDetails = + addDistributedAutonomousDatabaseGdsControlNodeDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(AddDistributedAutonomousDatabaseGdsControlNodeRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + addDistributedAutonomousDatabaseGdsControlNodeDetails( + o.getAddDistributedAutonomousDatabaseGdsControlNodeDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddDistributedAutonomousDatabaseGdsControlNodeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddDistributedAutonomousDatabaseGdsControlNodeRequest + */ + public AddDistributedAutonomousDatabaseGdsControlNodeRequest build() { + AddDistributedAutonomousDatabaseGdsControlNodeRequest 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.distributeddatabasev26.model + .AddDistributedAutonomousDatabaseGdsControlNodeDetails + body) { + addDistributedAutonomousDatabaseGdsControlNodeDetails(body); + return this; + } + + /** + * Build the instance of AddDistributedAutonomousDatabaseGdsControlNodeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddDistributedAutonomousDatabaseGdsControlNodeRequest + */ + public AddDistributedAutonomousDatabaseGdsControlNodeRequest + buildWithoutInvocationCallback() { + AddDistributedAutonomousDatabaseGdsControlNodeRequest request = + new AddDistributedAutonomousDatabaseGdsControlNodeRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.addDistributedAutonomousDatabaseGdsControlNodeDetails = + addDistributedAutonomousDatabaseGdsControlNodeDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new AddDistributedAutonomousDatabaseGdsControlNodeRequest(distributedAutonomousDatabaseId, addDistributedAutonomousDatabaseGdsControlNodeDetails, opcRequestId, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .addDistributedAutonomousDatabaseGdsControlNodeDetails( + addDistributedAutonomousDatabaseGdsControlNodeDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",addDistributedAutonomousDatabaseGdsControlNodeDetails=") + .append(String.valueOf(this.addDistributedAutonomousDatabaseGdsControlNodeDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 AddDistributedAutonomousDatabaseGdsControlNodeRequest)) { + return false; + } + + AddDistributedAutonomousDatabaseGdsControlNodeRequest other = + (AddDistributedAutonomousDatabaseGdsControlNodeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.addDistributedAutonomousDatabaseGdsControlNodeDetails, + other.addDistributedAutonomousDatabaseGdsControlNodeDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.addDistributedAutonomousDatabaseGdsControlNodeDetails == null + ? 43 + : this.addDistributedAutonomousDatabaseGdsControlNodeDetails + .hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedDatabaseGdsControlNodeRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedDatabaseGdsControlNodeRequest.java new file mode 100644 index 0000000000..bc4dec54c3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/AddDistributedDatabaseGdsControlNodeRequest.java @@ -0,0 +1,391 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use AddDistributedDatabaseGdsControlNodeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedDatabaseGdsControlNodeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedDatabaseGdsControlNodeDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed database. + * + */ + private com.oracle.bmc.distributeddatabasev26.model.AddDistributedDatabaseGdsControlNodeDetails + addDistributedDatabaseGdsControlNodeDetails; + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed database. + * + */ + public com.oracle.bmc.distributeddatabasev26.model.AddDistributedDatabaseGdsControlNodeDetails + getAddDistributedDatabaseGdsControlNodeDetails() { + return addDistributedDatabaseGdsControlNodeDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.AddDistributedDatabaseGdsControlNodeDetails + getBody$() { + return addDistributedDatabaseGdsControlNodeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddDistributedDatabaseGdsControlNodeRequest, + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedDatabaseGdsControlNodeDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed database. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .AddDistributedDatabaseGdsControlNodeDetails + addDistributedDatabaseGdsControlNodeDetails = null; + + /** + * Details required to provision the new Global database services control(GDS CTL) node for the Distributed database. + * + * @param addDistributedDatabaseGdsControlNodeDetails the value to set + * @return this builder instance + */ + public Builder addDistributedDatabaseGdsControlNodeDetails( + com.oracle.bmc.distributeddatabasev26.model + .AddDistributedDatabaseGdsControlNodeDetails + addDistributedDatabaseGdsControlNodeDetails) { + this.addDistributedDatabaseGdsControlNodeDetails = + addDistributedDatabaseGdsControlNodeDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(AddDistributedDatabaseGdsControlNodeRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + addDistributedDatabaseGdsControlNodeDetails( + o.getAddDistributedDatabaseGdsControlNodeDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddDistributedDatabaseGdsControlNodeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddDistributedDatabaseGdsControlNodeRequest + */ + public AddDistributedDatabaseGdsControlNodeRequest build() { + AddDistributedDatabaseGdsControlNodeRequest 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.distributeddatabasev26.model + .AddDistributedDatabaseGdsControlNodeDetails + body) { + addDistributedDatabaseGdsControlNodeDetails(body); + return this; + } + + /** + * Build the instance of AddDistributedDatabaseGdsControlNodeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddDistributedDatabaseGdsControlNodeRequest + */ + public AddDistributedDatabaseGdsControlNodeRequest buildWithoutInvocationCallback() { + AddDistributedDatabaseGdsControlNodeRequest request = + new AddDistributedDatabaseGdsControlNodeRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.addDistributedDatabaseGdsControlNodeDetails = + addDistributedDatabaseGdsControlNodeDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new AddDistributedDatabaseGdsControlNodeRequest(distributedDatabaseId, addDistributedDatabaseGdsControlNodeDetails, opcRequestId, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .addDistributedDatabaseGdsControlNodeDetails( + addDistributedDatabaseGdsControlNodeDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",addDistributedDatabaseGdsControlNodeDetails=") + .append(String.valueOf(this.addDistributedDatabaseGdsControlNodeDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 AddDistributedDatabaseGdsControlNodeRequest)) { + return false; + } + + AddDistributedDatabaseGdsControlNodeRequest other = + (AddDistributedDatabaseGdsControlNodeRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.addDistributedDatabaseGdsControlNodeDetails, + other.addDistributedDatabaseGdsControlNodeDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.addDistributedDatabaseGdsControlNodeDetails == null + ? 43 + : this.addDistributedDatabaseGdsControlNodeDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDatabaseCompartmentRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDatabaseCompartmentRequest.java new file mode 100644 index 0000000000..534427c496 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDatabaseCompartmentRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ChangeDistributedAutonomousDatabaseCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDatabaseCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails> { + + /** + * Request to move the Globally distributed autonomous database to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + changeDistributedAutonomousDatabaseCompartmentDetails; + + /** + * Request to move the Globally distributed autonomous database to a different compartment. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + getChangeDistributedAutonomousDatabaseCompartmentDetails() { + return changeDistributedAutonomousDatabaseCompartmentDetails; + } + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + getBody$() { + return changeDistributedAutonomousDatabaseCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDistributedAutonomousDatabaseCompartmentRequest, + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move the Globally distributed autonomous database to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + changeDistributedAutonomousDatabaseCompartmentDetails = null; + + /** + * Request to move the Globally distributed autonomous database to a different compartment. + * @param changeDistributedAutonomousDatabaseCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeDistributedAutonomousDatabaseCompartmentDetails( + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + changeDistributedAutonomousDatabaseCompartmentDetails) { + this.changeDistributedAutonomousDatabaseCompartmentDetails = + changeDistributedAutonomousDatabaseCompartmentDetails; + return this; + } + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ChangeDistributedAutonomousDatabaseCompartmentRequest o) { + changeDistributedAutonomousDatabaseCompartmentDetails( + o.getChangeDistributedAutonomousDatabaseCompartmentDetails()); + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDistributedAutonomousDatabaseCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDistributedAutonomousDatabaseCompartmentRequest + */ + public ChangeDistributedAutonomousDatabaseCompartmentRequest build() { + ChangeDistributedAutonomousDatabaseCompartmentRequest 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.distributeddatabasev26.model + .ChangeDistributedAutonomousDatabaseCompartmentDetails + body) { + changeDistributedAutonomousDatabaseCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeDistributedAutonomousDatabaseCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDistributedAutonomousDatabaseCompartmentRequest + */ + public ChangeDistributedAutonomousDatabaseCompartmentRequest + buildWithoutInvocationCallback() { + ChangeDistributedAutonomousDatabaseCompartmentRequest request = + new ChangeDistributedAutonomousDatabaseCompartmentRequest(); + request.changeDistributedAutonomousDatabaseCompartmentDetails = + changeDistributedAutonomousDatabaseCompartmentDetails; + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeDistributedAutonomousDatabaseCompartmentRequest(changeDistributedAutonomousDatabaseCompartmentDetails, distributedAutonomousDatabaseId, opcRequestId, ifMatch, 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() + .changeDistributedAutonomousDatabaseCompartmentDetails( + changeDistributedAutonomousDatabaseCompartmentDetails) + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",changeDistributedAutonomousDatabaseCompartmentDetails=") + .append(String.valueOf(this.changeDistributedAutonomousDatabaseCompartmentDetails)); + sb.append(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ChangeDistributedAutonomousDatabaseCompartmentRequest)) { + return false; + } + + ChangeDistributedAutonomousDatabaseCompartmentRequest other = + (ChangeDistributedAutonomousDatabaseCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeDistributedAutonomousDatabaseCompartmentDetails, + other.changeDistributedAutonomousDatabaseCompartmentDetails) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeDistributedAutonomousDatabaseCompartmentDetails == null + ? 43 + : this.changeDistributedAutonomousDatabaseCompartmentDetails + .hashCode()); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDbBackupConfigRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDbBackupConfigRequest.java new file mode 100644 index 0000000000..f38cde4484 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedAutonomousDbBackupConfigRequest.java @@ -0,0 +1,393 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ChangeDistributedAutonomousDbBackupConfigRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDbBackupConfigRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Details of the DistributedAutonomousDbBackupConfig for the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + changeDistributedAutonomousDbBackupConfigDetails; + + /** + * Details of the DistributedAutonomousDbBackupConfig for the Globally distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + getChangeDistributedAutonomousDbBackupConfigDetails() { + return changeDistributedAutonomousDbBackupConfigDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + getBody$() { + return changeDistributedAutonomousDbBackupConfigDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDistributedAutonomousDbBackupConfigRequest, + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Details of the DistributedAutonomousDbBackupConfig for the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + changeDistributedAutonomousDbBackupConfigDetails = null; + + /** + * Details of the DistributedAutonomousDbBackupConfig for the Globally distributed autonomous database. + * @param changeDistributedAutonomousDbBackupConfigDetails the value to set + * @return this builder instance + */ + public Builder changeDistributedAutonomousDbBackupConfigDetails( + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + changeDistributedAutonomousDbBackupConfigDetails) { + this.changeDistributedAutonomousDbBackupConfigDetails = + changeDistributedAutonomousDbBackupConfigDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ChangeDistributedAutonomousDbBackupConfigRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + changeDistributedAutonomousDbBackupConfigDetails( + o.getChangeDistributedAutonomousDbBackupConfigDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDistributedAutonomousDbBackupConfigRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDistributedAutonomousDbBackupConfigRequest + */ + public ChangeDistributedAutonomousDbBackupConfigRequest build() { + ChangeDistributedAutonomousDbBackupConfigRequest 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.distributeddatabasev26.model + .ChangeDistributedAutonomousDbBackupConfigDetails + body) { + changeDistributedAutonomousDbBackupConfigDetails(body); + return this; + } + + /** + * Build the instance of ChangeDistributedAutonomousDbBackupConfigRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDistributedAutonomousDbBackupConfigRequest + */ + public ChangeDistributedAutonomousDbBackupConfigRequest buildWithoutInvocationCallback() { + ChangeDistributedAutonomousDbBackupConfigRequest request = + new ChangeDistributedAutonomousDbBackupConfigRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.changeDistributedAutonomousDbBackupConfigDetails = + changeDistributedAutonomousDbBackupConfigDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeDistributedAutonomousDbBackupConfigRequest(distributedAutonomousDatabaseId, changeDistributedAutonomousDbBackupConfigDetails, opcRequestId, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .changeDistributedAutonomousDbBackupConfigDetails( + changeDistributedAutonomousDbBackupConfigDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",changeDistributedAutonomousDbBackupConfigDetails=") + .append(String.valueOf(this.changeDistributedAutonomousDbBackupConfigDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ChangeDistributedAutonomousDbBackupConfigRequest)) { + return false; + } + + ChangeDistributedAutonomousDbBackupConfigRequest other = + (ChangeDistributedAutonomousDbBackupConfigRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.changeDistributedAutonomousDbBackupConfigDetails, + other.changeDistributedAutonomousDbBackupConfigDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.changeDistributedAutonomousDbBackupConfigDetails == null + ? 43 + : this.changeDistributedAutonomousDbBackupConfigDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabaseCompartmentRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabaseCompartmentRequest.java new file mode 100644 index 0000000000..7d93eac4f3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabaseCompartmentRequest.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ChangeDistributedDatabaseCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabaseCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabaseCompartmentDetails> { + + /** + * Request to move the Globally distributed database to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDatabaseCompartmentDetails + changeDistributedDatabaseCompartmentDetails; + + /** + * Request to move the Globally distributed database to a different compartment. + */ + public com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDatabaseCompartmentDetails + getChangeDistributedDatabaseCompartmentDetails() { + return changeDistributedDatabaseCompartmentDetails; + } + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDatabaseCompartmentDetails + getBody$() { + return changeDistributedDatabaseCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDistributedDatabaseCompartmentRequest, + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabaseCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move the Globally distributed database to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabaseCompartmentDetails + changeDistributedDatabaseCompartmentDetails = null; + + /** + * Request to move the Globally distributed database to a different compartment. + * @param changeDistributedDatabaseCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeDistributedDatabaseCompartmentDetails( + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabaseCompartmentDetails + changeDistributedDatabaseCompartmentDetails) { + this.changeDistributedDatabaseCompartmentDetails = + changeDistributedDatabaseCompartmentDetails; + return this; + } + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ChangeDistributedDatabaseCompartmentRequest o) { + changeDistributedDatabaseCompartmentDetails( + o.getChangeDistributedDatabaseCompartmentDetails()); + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDistributedDatabaseCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDistributedDatabaseCompartmentRequest + */ + public ChangeDistributedDatabaseCompartmentRequest build() { + ChangeDistributedDatabaseCompartmentRequest 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.distributeddatabasev26.model + .ChangeDistributedDatabaseCompartmentDetails + body) { + changeDistributedDatabaseCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeDistributedDatabaseCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDistributedDatabaseCompartmentRequest + */ + public ChangeDistributedDatabaseCompartmentRequest buildWithoutInvocationCallback() { + ChangeDistributedDatabaseCompartmentRequest request = + new ChangeDistributedDatabaseCompartmentRequest(); + request.changeDistributedDatabaseCompartmentDetails = + changeDistributedDatabaseCompartmentDetails; + request.distributedDatabaseId = distributedDatabaseId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeDistributedDatabaseCompartmentRequest(changeDistributedDatabaseCompartmentDetails, distributedDatabaseId, opcRequestId, ifMatch, 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() + .changeDistributedDatabaseCompartmentDetails( + changeDistributedDatabaseCompartmentDetails) + .distributedDatabaseId(distributedDatabaseId) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",changeDistributedDatabaseCompartmentDetails=") + .append(String.valueOf(this.changeDistributedDatabaseCompartmentDetails)); + sb.append(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ChangeDistributedDatabaseCompartmentRequest)) { + return false; + } + + ChangeDistributedDatabaseCompartmentRequest other = + (ChangeDistributedDatabaseCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeDistributedDatabaseCompartmentDetails, + other.changeDistributedDatabaseCompartmentDetails) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeDistributedDatabaseCompartmentDetails == null + ? 43 + : this.changeDistributedDatabaseCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabasePrivateEndpointCompartmentRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabasePrivateEndpointCompartmentRequest.java new file mode 100644 index 0000000000..7c62b6b998 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDatabasePrivateEndpointCompartmentRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ChangeDistributedDatabasePrivateEndpointCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabasePrivateEndpointCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails> { + + /** + * Request to move the private endpoint to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + changeDistributedDatabasePrivateEndpointCompartmentDetails; + + /** + * Request to move the private endpoint to a different compartment. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + getChangeDistributedDatabasePrivateEndpointCompartmentDetails() { + return changeDistributedDatabasePrivateEndpointCompartmentDetails; + } + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + getBody$() { + return changeDistributedDatabasePrivateEndpointCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDistributedDatabasePrivateEndpointCompartmentRequest, + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move the private endpoint to a different compartment. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + changeDistributedDatabasePrivateEndpointCompartmentDetails = null; + + /** + * Request to move the private endpoint to a different compartment. + * @param changeDistributedDatabasePrivateEndpointCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeDistributedDatabasePrivateEndpointCompartmentDetails( + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + changeDistributedDatabasePrivateEndpointCompartmentDetails) { + this.changeDistributedDatabasePrivateEndpointCompartmentDetails = + changeDistributedDatabasePrivateEndpointCompartmentDetails; + return this; + } + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ChangeDistributedDatabasePrivateEndpointCompartmentRequest o) { + changeDistributedDatabasePrivateEndpointCompartmentDetails( + o.getChangeDistributedDatabasePrivateEndpointCompartmentDetails()); + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDistributedDatabasePrivateEndpointCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDistributedDatabasePrivateEndpointCompartmentRequest + */ + public ChangeDistributedDatabasePrivateEndpointCompartmentRequest build() { + ChangeDistributedDatabasePrivateEndpointCompartmentRequest 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.distributeddatabasev26.model + .ChangeDistributedDatabasePrivateEndpointCompartmentDetails + body) { + changeDistributedDatabasePrivateEndpointCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeDistributedDatabasePrivateEndpointCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDistributedDatabasePrivateEndpointCompartmentRequest + */ + public ChangeDistributedDatabasePrivateEndpointCompartmentRequest + buildWithoutInvocationCallback() { + ChangeDistributedDatabasePrivateEndpointCompartmentRequest request = + new ChangeDistributedDatabasePrivateEndpointCompartmentRequest(); + request.changeDistributedDatabasePrivateEndpointCompartmentDetails = + changeDistributedDatabasePrivateEndpointCompartmentDetails; + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeDistributedDatabasePrivateEndpointCompartmentRequest(changeDistributedDatabasePrivateEndpointCompartmentDetails, distributedDatabasePrivateEndpointId, opcRequestId, ifMatch, 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() + .changeDistributedDatabasePrivateEndpointCompartmentDetails( + changeDistributedDatabasePrivateEndpointCompartmentDetails) + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",changeDistributedDatabasePrivateEndpointCompartmentDetails=") + .append( + String.valueOf( + this.changeDistributedDatabasePrivateEndpointCompartmentDetails)); + sb.append(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ChangeDistributedDatabasePrivateEndpointCompartmentRequest)) { + return false; + } + + ChangeDistributedDatabasePrivateEndpointCompartmentRequest other = + (ChangeDistributedDatabasePrivateEndpointCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeDistributedDatabasePrivateEndpointCompartmentDetails, + other.changeDistributedDatabasePrivateEndpointCompartmentDetails) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeDistributedDatabasePrivateEndpointCompartmentDetails == null + ? 43 + : this.changeDistributedDatabasePrivateEndpointCompartmentDetails + .hashCode()); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDbBackupConfigRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDbBackupConfigRequest.java new file mode 100644 index 0000000000..6d72cc3e47 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ChangeDistributedDbBackupConfigRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ChangeDistributedDbBackupConfigRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDbBackupConfigRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDbBackupConfigDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Details of the DistributedDbBackupConfig for the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + changeDistributedDbBackupConfigDetails; + + /** + * Details of the DistributedDbBackupConfig for the Globally distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + getChangeDistributedDbBackupConfigDetails() { + return changeDistributedDbBackupConfigDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + getBody$() { + return changeDistributedDbBackupConfigDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDistributedDbBackupConfigRequest, + com.oracle.bmc.distributeddatabasev26.model + .ChangeDistributedDbBackupConfigDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Details of the DistributedDbBackupConfig for the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + changeDistributedDbBackupConfigDetails = null; + + /** + * Details of the DistributedDbBackupConfig for the Globally distributed database. + * @param changeDistributedDbBackupConfigDetails the value to set + * @return this builder instance + */ + public Builder changeDistributedDbBackupConfigDetails( + com.oracle.bmc.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + changeDistributedDbBackupConfigDetails) { + this.changeDistributedDbBackupConfigDetails = changeDistributedDbBackupConfigDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ChangeDistributedDbBackupConfigRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + changeDistributedDbBackupConfigDetails(o.getChangeDistributedDbBackupConfigDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDistributedDbBackupConfigRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDistributedDbBackupConfigRequest + */ + public ChangeDistributedDbBackupConfigRequest build() { + ChangeDistributedDbBackupConfigRequest 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.distributeddatabasev26.model.ChangeDistributedDbBackupConfigDetails + body) { + changeDistributedDbBackupConfigDetails(body); + return this; + } + + /** + * Build the instance of ChangeDistributedDbBackupConfigRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDistributedDbBackupConfigRequest + */ + public ChangeDistributedDbBackupConfigRequest buildWithoutInvocationCallback() { + ChangeDistributedDbBackupConfigRequest request = + new ChangeDistributedDbBackupConfigRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.changeDistributedDbBackupConfigDetails = changeDistributedDbBackupConfigDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeDistributedDbBackupConfigRequest(distributedDatabaseId, changeDistributedDbBackupConfigDetails, opcRequestId, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .changeDistributedDbBackupConfigDetails(changeDistributedDbBackupConfigDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",changeDistributedDbBackupConfigDetails=") + .append(String.valueOf(this.changeDistributedDbBackupConfigDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ChangeDistributedDbBackupConfigRequest)) { + return false; + } + + ChangeDistributedDbBackupConfigRequest other = (ChangeDistributedDbBackupConfigRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.changeDistributedDbBackupConfigDetails, + other.changeDistributedDbBackupConfigDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.changeDistributedDbBackupConfigDetails == null + ? 43 + : this.changeDistributedDbBackupConfigDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest.java new file mode 100644 index 0000000000..6122a8e393 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The payload for configuring autoResourceManagement for autonomous distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + configureDistributedAutonomousDatabaseAutoResourceManagementDetails; + + /** + * The payload for configuring autoResourceManagement for autonomous distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + getConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails() { + return configureDistributedAutonomousDatabaseAutoResourceManagementDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + getBody$() { + return configureDistributedAutonomousDatabaseAutoResourceManagementDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest, + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * The payload for configuring autoResourceManagement for autonomous distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + configureDistributedAutonomousDatabaseAutoResourceManagementDetails = null; + + /** + * The payload for configuring autoResourceManagement for autonomous distributed database. + * @param configureDistributedAutonomousDatabaseAutoResourceManagementDetails the value to set + * @return this builder instance + */ + public Builder configureDistributedAutonomousDatabaseAutoResourceManagementDetails( + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + configureDistributedAutonomousDatabaseAutoResourceManagementDetails) { + this.configureDistributedAutonomousDatabaseAutoResourceManagementDetails = + configureDistributedAutonomousDatabaseAutoResourceManagementDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + configureDistributedAutonomousDatabaseAutoResourceManagementDetails( + o.getConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + */ + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest build() { + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest 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.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseAutoResourceManagementDetails + body) { + configureDistributedAutonomousDatabaseAutoResourceManagementDetails(body); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + */ + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest + buildWithoutInvocationCallback() { + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest request = + new ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.configureDistributedAutonomousDatabaseAutoResourceManagementDetails = + configureDistributedAutonomousDatabaseAutoResourceManagementDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest(distributedAutonomousDatabaseId, configureDistributedAutonomousDatabaseAutoResourceManagementDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .configureDistributedAutonomousDatabaseAutoResourceManagementDetails( + configureDistributedAutonomousDatabaseAutoResourceManagementDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",configureDistributedAutonomousDatabaseAutoResourceManagementDetails=") + .append( + String.valueOf( + this.configureDistributedAutonomousDatabaseAutoResourceManagementDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest other = + (ConfigureDistributedAutonomousDatabaseAutoResourceManagementRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.configureDistributedAutonomousDatabaseAutoResourceManagementDetails, + other.configureDistributedAutonomousDatabaseAutoResourceManagementDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.configureDistributedAutonomousDatabaseAutoResourceManagementDetails + == null + ? 43 + : this + .configureDistributedAutonomousDatabaseAutoResourceManagementDetails + .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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmWalletRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmWalletRequest.java new file mode 100644 index 0000000000..2101f0bd3f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmWalletRequest.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedAutonomousDatabaseGsmWalletRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmWalletRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails> { + + /** + * Details to configure wallets on GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + configureDistributedAutonomousDatabaseGsmWalletDetails; + + /** + * Details to configure wallets on GSM instances for the distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + getConfigureDistributedAutonomousDatabaseGsmWalletDetails() { + return configureDistributedAutonomousDatabaseGsmWalletDetails; + } + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + getBody$() { + return configureDistributedAutonomousDatabaseGsmWalletDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedAutonomousDatabaseGsmWalletRequest, + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details to configure wallets on GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + configureDistributedAutonomousDatabaseGsmWalletDetails = null; + + /** + * Details to configure wallets on GSM instances for the distributed autonomous database. + * @param configureDistributedAutonomousDatabaseGsmWalletDetails the value to set + * @return this builder instance + */ + public Builder configureDistributedAutonomousDatabaseGsmWalletDetails( + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + configureDistributedAutonomousDatabaseGsmWalletDetails) { + this.configureDistributedAutonomousDatabaseGsmWalletDetails = + configureDistributedAutonomousDatabaseGsmWalletDetails; + return this; + } + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedAutonomousDatabaseGsmWalletRequest o) { + configureDistributedAutonomousDatabaseGsmWalletDetails( + o.getConfigureDistributedAutonomousDatabaseGsmWalletDetails()); + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseGsmWalletRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedAutonomousDatabaseGsmWalletRequest + */ + public ConfigureDistributedAutonomousDatabaseGsmWalletRequest build() { + ConfigureDistributedAutonomousDatabaseGsmWalletRequest 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.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmWalletDetails + body) { + configureDistributedAutonomousDatabaseGsmWalletDetails(body); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseGsmWalletRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedAutonomousDatabaseGsmWalletRequest + */ + public ConfigureDistributedAutonomousDatabaseGsmWalletRequest + buildWithoutInvocationCallback() { + ConfigureDistributedAutonomousDatabaseGsmWalletRequest request = + new ConfigureDistributedAutonomousDatabaseGsmWalletRequest(); + request.configureDistributedAutonomousDatabaseGsmWalletDetails = + configureDistributedAutonomousDatabaseGsmWalletDetails; + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedAutonomousDatabaseGsmWalletRequest(configureDistributedAutonomousDatabaseGsmWalletDetails, distributedAutonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .configureDistributedAutonomousDatabaseGsmWalletDetails( + configureDistributedAutonomousDatabaseGsmWalletDetails) + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",configureDistributedAutonomousDatabaseGsmWalletDetails=") + .append( + String.valueOf( + this.configureDistributedAutonomousDatabaseGsmWalletDetails)); + sb.append(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseGsmWalletRequest)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmWalletRequest other = + (ConfigureDistributedAutonomousDatabaseGsmWalletRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.configureDistributedAutonomousDatabaseGsmWalletDetails, + other.configureDistributedAutonomousDatabaseGsmWalletDetails) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.configureDistributedAutonomousDatabaseGsmWalletDetails == null + ? 43 + : this.configureDistributedAutonomousDatabaseGsmWalletDetails + .hashCode()); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmsRequest.java new file mode 100644 index 0000000000..13a50f3d6a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseGsmsRequest.java @@ -0,0 +1,394 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedAutonomousDatabaseGsmsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails> { + + /** + * Details to configure the new GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + configureDistributedAutonomousDatabaseGsmsDetails; + + /** + * Details to configure the new GSM instances for the distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + getConfigureDistributedAutonomousDatabaseGsmsDetails() { + return configureDistributedAutonomousDatabaseGsmsDetails; + } + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + getBody$() { + return configureDistributedAutonomousDatabaseGsmsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedAutonomousDatabaseGsmsRequest, + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details to configure the new GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + configureDistributedAutonomousDatabaseGsmsDetails = null; + + /** + * Details to configure the new GSM instances for the distributed autonomous database. + * @param configureDistributedAutonomousDatabaseGsmsDetails the value to set + * @return this builder instance + */ + public Builder configureDistributedAutonomousDatabaseGsmsDetails( + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + configureDistributedAutonomousDatabaseGsmsDetails) { + this.configureDistributedAutonomousDatabaseGsmsDetails = + configureDistributedAutonomousDatabaseGsmsDetails; + return this; + } + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedAutonomousDatabaseGsmsRequest o) { + configureDistributedAutonomousDatabaseGsmsDetails( + o.getConfigureDistributedAutonomousDatabaseGsmsDetails()); + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseGsmsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedAutonomousDatabaseGsmsRequest + */ + public ConfigureDistributedAutonomousDatabaseGsmsRequest build() { + ConfigureDistributedAutonomousDatabaseGsmsRequest 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.distributeddatabasev26.model + .ConfigureDistributedAutonomousDatabaseGsmsDetails + body) { + configureDistributedAutonomousDatabaseGsmsDetails(body); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseGsmsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedAutonomousDatabaseGsmsRequest + */ + public ConfigureDistributedAutonomousDatabaseGsmsRequest buildWithoutInvocationCallback() { + ConfigureDistributedAutonomousDatabaseGsmsRequest request = + new ConfigureDistributedAutonomousDatabaseGsmsRequest(); + request.configureDistributedAutonomousDatabaseGsmsDetails = + configureDistributedAutonomousDatabaseGsmsDetails; + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedAutonomousDatabaseGsmsRequest(configureDistributedAutonomousDatabaseGsmsDetails, distributedAutonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .configureDistributedAutonomousDatabaseGsmsDetails( + configureDistributedAutonomousDatabaseGsmsDetails) + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",configureDistributedAutonomousDatabaseGsmsDetails=") + .append(String.valueOf(this.configureDistributedAutonomousDatabaseGsmsDetails)); + sb.append(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseGsmsRequest)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmsRequest other = + (ConfigureDistributedAutonomousDatabaseGsmsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.configureDistributedAutonomousDatabaseGsmsDetails, + other.configureDistributedAutonomousDatabaseGsmsDetails) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.configureDistributedAutonomousDatabaseGsmsDetails == null + ? 43 + : this.configureDistributedAutonomousDatabaseGsmsDetails + .hashCode()); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseShardingRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseShardingRequest.java new file mode 100644 index 0000000000..3387dc2c1c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedAutonomousDatabaseShardingRequest.java @@ -0,0 +1,422 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedAutonomousDatabaseShardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseShardingRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + private Boolean isRebalanceRequired; + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + public Boolean getIsRebalanceRequired() { + return isRebalanceRequired; + } + /** + * The ID of the cluster certificate. + */ + private String certificateId; + + /** + * The ID of the cluster certificate. + */ + public String getCertificateId() { + return certificateId; + } + /** + * The ID of the Ca Bundle. + */ + private String caBundleId; + + /** + * The ID of the Ca Bundle. + */ + public String getCaBundleId() { + return caBundleId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedAutonomousDatabaseShardingRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + private Boolean isRebalanceRequired = null; + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + * @param isRebalanceRequired the value to set + * @return this builder instance + */ + public Builder isRebalanceRequired(Boolean isRebalanceRequired) { + this.isRebalanceRequired = isRebalanceRequired; + return this; + } + + /** + * The ID of the cluster certificate. + */ + private String certificateId = null; + + /** + * The ID of the cluster certificate. + * @param certificateId the value to set + * @return this builder instance + */ + public Builder certificateId(String certificateId) { + this.certificateId = certificateId; + return this; + } + + /** + * The ID of the Ca Bundle. + */ + private String caBundleId = null; + + /** + * The ID of the Ca Bundle. + * @param caBundleId the value to set + * @return this builder instance + */ + public Builder caBundleId(String caBundleId) { + this.caBundleId = caBundleId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedAutonomousDatabaseShardingRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + isRebalanceRequired(o.getIsRebalanceRequired()); + certificateId(o.getCertificateId()); + caBundleId(o.getCaBundleId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseShardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedAutonomousDatabaseShardingRequest + */ + public ConfigureDistributedAutonomousDatabaseShardingRequest build() { + ConfigureDistributedAutonomousDatabaseShardingRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ConfigureDistributedAutonomousDatabaseShardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedAutonomousDatabaseShardingRequest + */ + public ConfigureDistributedAutonomousDatabaseShardingRequest + buildWithoutInvocationCallback() { + ConfigureDistributedAutonomousDatabaseShardingRequest request = + new ConfigureDistributedAutonomousDatabaseShardingRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.isRebalanceRequired = isRebalanceRequired; + request.certificateId = certificateId; + request.caBundleId = caBundleId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedAutonomousDatabaseShardingRequest(distributedAutonomousDatabaseId, isRebalanceRequired, certificateId, caBundleId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .isRebalanceRequired(isRebalanceRequired) + .certificateId(certificateId) + .caBundleId(caBundleId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",isRebalanceRequired=").append(String.valueOf(this.isRebalanceRequired)); + sb.append(",certificateId=").append(String.valueOf(this.certificateId)); + sb.append(",caBundleId=").append(String.valueOf(this.caBundleId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseShardingRequest)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseShardingRequest other = + (ConfigureDistributedAutonomousDatabaseShardingRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.isRebalanceRequired, other.isRebalanceRequired) + && java.util.Objects.equals(this.certificateId, other.certificateId) + && java.util.Objects.equals(this.caBundleId, other.caBundleId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.isRebalanceRequired == null + ? 43 + : this.isRebalanceRequired.hashCode()); + result = + (result * PRIME) + + (this.certificateId == null ? 43 : this.certificateId.hashCode()); + result = (result * PRIME) + (this.caBundleId == null ? 43 : this.caBundleId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseAutoResourceManagementRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseAutoResourceManagementRequest.java new file mode 100644 index 0000000000..6b3bb1eb70 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseAutoResourceManagementRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedDatabaseAutoResourceManagementRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseAutoResourceManagementRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The payload for configuring autoResourceManagement for distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + configureDistributedDatabaseAutoResourceManagementDetails; + + /** + * The payload for configuring autoResourceManagement for distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + getConfigureDistributedDatabaseAutoResourceManagementDetails() { + return configureDistributedDatabaseAutoResourceManagementDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + getBody$() { + return configureDistributedDatabaseAutoResourceManagementDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedDatabaseAutoResourceManagementRequest, + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * The payload for configuring autoResourceManagement for distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + configureDistributedDatabaseAutoResourceManagementDetails = null; + + /** + * The payload for configuring autoResourceManagement for distributed database. + * @param configureDistributedDatabaseAutoResourceManagementDetails the value to set + * @return this builder instance + */ + public Builder configureDistributedDatabaseAutoResourceManagementDetails( + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + configureDistributedDatabaseAutoResourceManagementDetails) { + this.configureDistributedDatabaseAutoResourceManagementDetails = + configureDistributedDatabaseAutoResourceManagementDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedDatabaseAutoResourceManagementRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + configureDistributedDatabaseAutoResourceManagementDetails( + o.getConfigureDistributedDatabaseAutoResourceManagementDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedDatabaseAutoResourceManagementRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedDatabaseAutoResourceManagementRequest + */ + public ConfigureDistributedDatabaseAutoResourceManagementRequest build() { + ConfigureDistributedDatabaseAutoResourceManagementRequest 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.distributeddatabasev26.model + .ConfigureDistributedDatabaseAutoResourceManagementDetails + body) { + configureDistributedDatabaseAutoResourceManagementDetails(body); + return this; + } + + /** + * Build the instance of ConfigureDistributedDatabaseAutoResourceManagementRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedDatabaseAutoResourceManagementRequest + */ + public ConfigureDistributedDatabaseAutoResourceManagementRequest + buildWithoutInvocationCallback() { + ConfigureDistributedDatabaseAutoResourceManagementRequest request = + new ConfigureDistributedDatabaseAutoResourceManagementRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.configureDistributedDatabaseAutoResourceManagementDetails = + configureDistributedDatabaseAutoResourceManagementDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedDatabaseAutoResourceManagementRequest(distributedDatabaseId, configureDistributedDatabaseAutoResourceManagementDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .configureDistributedDatabaseAutoResourceManagementDetails( + configureDistributedDatabaseAutoResourceManagementDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",configureDistributedDatabaseAutoResourceManagementDetails=") + .append( + String.valueOf( + this.configureDistributedDatabaseAutoResourceManagementDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseAutoResourceManagementRequest)) { + return false; + } + + ConfigureDistributedDatabaseAutoResourceManagementRequest other = + (ConfigureDistributedDatabaseAutoResourceManagementRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.configureDistributedDatabaseAutoResourceManagementDetails, + other.configureDistributedDatabaseAutoResourceManagementDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.configureDistributedDatabaseAutoResourceManagementDetails == null + ? 43 + : this.configureDistributedDatabaseAutoResourceManagementDetails + .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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseGsmsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseGsmsRequest.java new file mode 100644 index 0000000000..17727ce607 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseGsmsRequest.java @@ -0,0 +1,380 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedDatabaseGsmsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseGsmsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseGsmsDetails> { + + /** + * Details to configure the new GSM instances for the distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + configureDistributedDatabaseGsmsDetails; + + /** + * Details to configure the new GSM instances for the distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + getConfigureDistributedDatabaseGsmsDetails() { + return configureDistributedDatabaseGsmsDetails; + } + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + getBody$() { + return configureDistributedDatabaseGsmsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedDatabaseGsmsRequest, + com.oracle.bmc.distributeddatabasev26.model + .ConfigureDistributedDatabaseGsmsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details to configure the new GSM instances for the distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + configureDistributedDatabaseGsmsDetails = null; + + /** + * Details to configure the new GSM instances for the distributed database. + * @param configureDistributedDatabaseGsmsDetails the value to set + * @return this builder instance + */ + public Builder configureDistributedDatabaseGsmsDetails( + com.oracle.bmc.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + configureDistributedDatabaseGsmsDetails) { + this.configureDistributedDatabaseGsmsDetails = configureDistributedDatabaseGsmsDetails; + return this; + } + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedDatabaseGsmsRequest o) { + configureDistributedDatabaseGsmsDetails(o.getConfigureDistributedDatabaseGsmsDetails()); + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedDatabaseGsmsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedDatabaseGsmsRequest + */ + public ConfigureDistributedDatabaseGsmsRequest build() { + ConfigureDistributedDatabaseGsmsRequest 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.distributeddatabasev26.model.ConfigureDistributedDatabaseGsmsDetails + body) { + configureDistributedDatabaseGsmsDetails(body); + return this; + } + + /** + * Build the instance of ConfigureDistributedDatabaseGsmsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedDatabaseGsmsRequest + */ + public ConfigureDistributedDatabaseGsmsRequest buildWithoutInvocationCallback() { + ConfigureDistributedDatabaseGsmsRequest request = + new ConfigureDistributedDatabaseGsmsRequest(); + request.configureDistributedDatabaseGsmsDetails = + configureDistributedDatabaseGsmsDetails; + request.distributedDatabaseId = distributedDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedDatabaseGsmsRequest(configureDistributedDatabaseGsmsDetails, distributedDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .configureDistributedDatabaseGsmsDetails(configureDistributedDatabaseGsmsDetails) + .distributedDatabaseId(distributedDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",configureDistributedDatabaseGsmsDetails=") + .append(String.valueOf(this.configureDistributedDatabaseGsmsDetails)); + sb.append(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseGsmsRequest)) { + return false; + } + + ConfigureDistributedDatabaseGsmsRequest other = (ConfigureDistributedDatabaseGsmsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.configureDistributedDatabaseGsmsDetails, + other.configureDistributedDatabaseGsmsDetails) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.configureDistributedDatabaseGsmsDetails == null + ? 43 + : this.configureDistributedDatabaseGsmsDetails.hashCode()); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseShardingRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseShardingRequest.java new file mode 100644 index 0000000000..2e2abe2871 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ConfigureDistributedDatabaseShardingRequest.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ConfigureDistributedDatabaseShardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseShardingRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + private Boolean isRebalanceRequired; + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + public Boolean getIsRebalanceRequired() { + return isRebalanceRequired; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureDistributedDatabaseShardingRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + */ + private Boolean isRebalanceRequired = null; + + /** + * The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + * sharding type. + * + * @param isRebalanceRequired the value to set + * @return this builder instance + */ + public Builder isRebalanceRequired(Boolean isRebalanceRequired) { + this.isRebalanceRequired = isRebalanceRequired; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ConfigureDistributedDatabaseShardingRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + isRebalanceRequired(o.getIsRebalanceRequired()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureDistributedDatabaseShardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureDistributedDatabaseShardingRequest + */ + public ConfigureDistributedDatabaseShardingRequest build() { + ConfigureDistributedDatabaseShardingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ConfigureDistributedDatabaseShardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureDistributedDatabaseShardingRequest + */ + public ConfigureDistributedDatabaseShardingRequest buildWithoutInvocationCallback() { + ConfigureDistributedDatabaseShardingRequest request = + new ConfigureDistributedDatabaseShardingRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.isRebalanceRequired = isRebalanceRequired; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfigureDistributedDatabaseShardingRequest(distributedDatabaseId, isRebalanceRequired, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .isRebalanceRequired(isRebalanceRequired) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",isRebalanceRequired=").append(String.valueOf(this.isRebalanceRequired)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseShardingRequest)) { + return false; + } + + ConfigureDistributedDatabaseShardingRequest other = + (ConfigureDistributedDatabaseShardingRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.isRebalanceRequired, other.isRebalanceRequired) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.isRebalanceRequired == null + ? 43 + : this.isRebalanceRequired.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..108cc8bd79 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use CreateDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedAutonomousDatabaseDetails> { + + /** + * Details of the Globally distributed autonomous database to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model.CreateDistributedAutonomousDatabaseDetails + createDistributedAutonomousDatabaseDetails; + + /** + * Details of the Globally distributed autonomous database to be created. + */ + public com.oracle.bmc.distributeddatabasev26.model.CreateDistributedAutonomousDatabaseDetails + getCreateDistributedAutonomousDatabaseDetails() { + return createDistributedAutonomousDatabaseDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.CreateDistributedAutonomousDatabaseDetails + getBody$() { + return createDistributedAutonomousDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDistributedAutonomousDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedAutonomousDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of the Globally distributed autonomous database to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedAutonomousDatabaseDetails + createDistributedAutonomousDatabaseDetails = null; + + /** + * Details of the Globally distributed autonomous database to be created. + * @param createDistributedAutonomousDatabaseDetails the value to set + * @return this builder instance + */ + public Builder createDistributedAutonomousDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedAutonomousDatabaseDetails + createDistributedAutonomousDatabaseDetails) { + this.createDistributedAutonomousDatabaseDetails = + createDistributedAutonomousDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(CreateDistributedAutonomousDatabaseRequest o) { + createDistributedAutonomousDatabaseDetails( + o.getCreateDistributedAutonomousDatabaseDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDistributedAutonomousDatabaseRequest + */ + public CreateDistributedAutonomousDatabaseRequest build() { + CreateDistributedAutonomousDatabaseRequest 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.distributeddatabasev26.model + .CreateDistributedAutonomousDatabaseDetails + body) { + createDistributedAutonomousDatabaseDetails(body); + return this; + } + + /** + * Build the instance of CreateDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDistributedAutonomousDatabaseRequest + */ + public CreateDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + CreateDistributedAutonomousDatabaseRequest request = + new CreateDistributedAutonomousDatabaseRequest(); + request.createDistributedAutonomousDatabaseDetails = + createDistributedAutonomousDatabaseDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDistributedAutonomousDatabaseRequest(createDistributedAutonomousDatabaseDetails, 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() + .createDistributedAutonomousDatabaseDetails( + createDistributedAutonomousDatabaseDetails) + .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(",createDistributedAutonomousDatabaseDetails=") + .append(String.valueOf(this.createDistributedAutonomousDatabaseDetails)); + 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 CreateDistributedAutonomousDatabaseRequest)) { + return false; + } + + CreateDistributedAutonomousDatabaseRequest other = + (CreateDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDistributedAutonomousDatabaseDetails, + other.createDistributedAutonomousDatabaseDetails) + && 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.createDistributedAutonomousDatabaseDetails == null + ? 43 + : this.createDistributedAutonomousDatabaseDetails.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabasePrivateEndpointRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabasePrivateEndpointRequest.java new file mode 100644 index 0000000000..6f68c1612d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabasePrivateEndpointRequest.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use CreateDistributedDatabasePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabasePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails> { + + /** + * Details of DistributedDatabasePrivateEndpoint to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + createDistributedDatabasePrivateEndpointDetails; + + /** + * Details of DistributedDatabasePrivateEndpoint to be created. + */ + public com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + getCreateDistributedDatabasePrivateEndpointDetails() { + return createDistributedDatabasePrivateEndpointDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + getBody$() { + return createDistributedDatabasePrivateEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDistributedDatabasePrivateEndpointRequest, + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of DistributedDatabasePrivateEndpoint to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + createDistributedDatabasePrivateEndpointDetails = null; + + /** + * Details of DistributedDatabasePrivateEndpoint to be created. + * @param createDistributedDatabasePrivateEndpointDetails the value to set + * @return this builder instance + */ + public Builder createDistributedDatabasePrivateEndpointDetails( + com.oracle.bmc.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + createDistributedDatabasePrivateEndpointDetails) { + this.createDistributedDatabasePrivateEndpointDetails = + createDistributedDatabasePrivateEndpointDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(CreateDistributedDatabasePrivateEndpointRequest o) { + createDistributedDatabasePrivateEndpointDetails( + o.getCreateDistributedDatabasePrivateEndpointDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDistributedDatabasePrivateEndpointRequest + */ + public CreateDistributedDatabasePrivateEndpointRequest build() { + CreateDistributedDatabasePrivateEndpointRequest 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.distributeddatabasev26.model + .CreateDistributedDatabasePrivateEndpointDetails + body) { + createDistributedDatabasePrivateEndpointDetails(body); + return this; + } + + /** + * Build the instance of CreateDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDistributedDatabasePrivateEndpointRequest + */ + public CreateDistributedDatabasePrivateEndpointRequest buildWithoutInvocationCallback() { + CreateDistributedDatabasePrivateEndpointRequest request = + new CreateDistributedDatabasePrivateEndpointRequest(); + request.createDistributedDatabasePrivateEndpointDetails = + createDistributedDatabasePrivateEndpointDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDistributedDatabasePrivateEndpointRequest(createDistributedDatabasePrivateEndpointDetails, 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() + .createDistributedDatabasePrivateEndpointDetails( + createDistributedDatabasePrivateEndpointDetails) + .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(",createDistributedDatabasePrivateEndpointDetails=") + .append(String.valueOf(this.createDistributedDatabasePrivateEndpointDetails)); + 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 CreateDistributedDatabasePrivateEndpointRequest)) { + return false; + } + + CreateDistributedDatabasePrivateEndpointRequest other = + (CreateDistributedDatabasePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDistributedDatabasePrivateEndpointDetails, + other.createDistributedDatabasePrivateEndpointDetails) + && 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.createDistributedDatabasePrivateEndpointDetails == null + ? 43 + : this.createDistributedDatabasePrivateEndpointDetails.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabaseRequest.java new file mode 100644 index 0000000000..c10a9cbca2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/CreateDistributedDatabaseRequest.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use CreateDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails> { + + /** + * Details of the Globally distributed database to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails + createDistributedDatabaseDetails; + + /** + * Details of the Globally distributed database to be created. + */ + public com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails + getCreateDistributedDatabaseDetails() { + return createDistributedDatabaseDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails getBody$() { + return createDistributedDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDistributedDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of the Globally distributed database to be created. + */ + private com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails + createDistributedDatabaseDetails = null; + + /** + * Details of the Globally distributed database to be created. + * @param createDistributedDatabaseDetails the value to set + * @return this builder instance + */ + public Builder createDistributedDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model.CreateDistributedDatabaseDetails + createDistributedDatabaseDetails) { + this.createDistributedDatabaseDetails = createDistributedDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(CreateDistributedDatabaseRequest o) { + createDistributedDatabaseDetails(o.getCreateDistributedDatabaseDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDistributedDatabaseRequest + */ + public CreateDistributedDatabaseRequest build() { + CreateDistributedDatabaseRequest 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.distributeddatabasev26.model.CreateDistributedDatabaseDetails body) { + createDistributedDatabaseDetails(body); + return this; + } + + /** + * Build the instance of CreateDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDistributedDatabaseRequest + */ + public CreateDistributedDatabaseRequest buildWithoutInvocationCallback() { + CreateDistributedDatabaseRequest request = new CreateDistributedDatabaseRequest(); + request.createDistributedDatabaseDetails = createDistributedDatabaseDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDistributedDatabaseRequest(createDistributedDatabaseDetails, 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() + .createDistributedDatabaseDetails(createDistributedDatabaseDetails) + .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(",createDistributedDatabaseDetails=") + .append(String.valueOf(this.createDistributedDatabaseDetails)); + 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 CreateDistributedDatabaseRequest)) { + return false; + } + + CreateDistributedDatabaseRequest other = (CreateDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDistributedDatabaseDetails, + other.createDistributedDatabaseDetails) + && 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.createDistributedDatabaseDetails == null + ? 43 + : this.createDistributedDatabaseDetails.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..c792af3218 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use DeleteDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDistributedAutonomousDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(DeleteDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDistributedAutonomousDatabaseRequest + */ + public DeleteDistributedAutonomousDatabaseRequest build() { + DeleteDistributedAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDistributedAutonomousDatabaseRequest + */ + public DeleteDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + DeleteDistributedAutonomousDatabaseRequest request = + new DeleteDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new DeleteDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDistributedAutonomousDatabaseRequest)) { + return false; + } + + DeleteDistributedAutonomousDatabaseRequest other = + (DeleteDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabasePrivateEndpointRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabasePrivateEndpointRequest.java new file mode 100644 index 0000000000..eebf03584f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabasePrivateEndpointRequest.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use DeleteDistributedDatabasePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabasePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * 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; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDistributedDatabasePrivateEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(DeleteDistributedDatabasePrivateEndpointRequest o) { + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDistributedDatabasePrivateEndpointRequest + */ + public DeleteDistributedDatabasePrivateEndpointRequest build() { + DeleteDistributedDatabasePrivateEndpointRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDistributedDatabasePrivateEndpointRequest + */ + public DeleteDistributedDatabasePrivateEndpointRequest buildWithoutInvocationCallback() { + DeleteDistributedDatabasePrivateEndpointRequest request = + new DeleteDistributedDatabasePrivateEndpointRequest(); + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new DeleteDistributedDatabasePrivateEndpointRequest(distributedDatabasePrivateEndpointId, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * 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() + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDistributedDatabasePrivateEndpointRequest)) { + return false; + } + + DeleteDistributedDatabasePrivateEndpointRequest other = + (DeleteDistributedDatabasePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabaseRequest.java new file mode 100644 index 0000000000..e70b345b1c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/DeleteDistributedDatabaseRequest.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use DeleteDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * 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; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDistributedDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(DeleteDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDistributedDatabaseRequest + */ + public DeleteDistributedDatabaseRequest build() { + DeleteDistributedDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDistributedDatabaseRequest + */ + public DeleteDistributedDatabaseRequest buildWithoutInvocationCallback() { + DeleteDistributedDatabaseRequest request = new DeleteDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new DeleteDistributedDatabaseRequest(distributedDatabaseId, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDistributedDatabaseRequest)) { + return false; + } + + DeleteDistributedDatabaseRequest other = (DeleteDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedAutonomousDatabaseWalletRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedAutonomousDatabaseWalletRequest.java new file mode 100644 index 0000000000..0307197d88 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedAutonomousDatabaseWalletRequest.java @@ -0,0 +1,394 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GenerateDistributedAutonomousDatabaseWalletRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedAutonomousDatabaseWalletRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Details for generating Globally distributed autonomous database wallet. + */ + private com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + generateDistributedAutonomousDatabaseWalletDetails; + + /** + * Details for generating Globally distributed autonomous database wallet. + */ + public com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + getGenerateDistributedAutonomousDatabaseWalletDetails() { + return generateDistributedAutonomousDatabaseWalletDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + getBody$() { + return generateDistributedAutonomousDatabaseWalletDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GenerateDistributedAutonomousDatabaseWalletRequest, + com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Details for generating Globally distributed autonomous database wallet. + */ + private com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + generateDistributedAutonomousDatabaseWalletDetails = null; + + /** + * Details for generating Globally distributed autonomous database wallet. + * @param generateDistributedAutonomousDatabaseWalletDetails the value to set + * @return this builder instance + */ + public Builder generateDistributedAutonomousDatabaseWalletDetails( + com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + generateDistributedAutonomousDatabaseWalletDetails) { + this.generateDistributedAutonomousDatabaseWalletDetails = + generateDistributedAutonomousDatabaseWalletDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(GenerateDistributedAutonomousDatabaseWalletRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + generateDistributedAutonomousDatabaseWalletDetails( + o.getGenerateDistributedAutonomousDatabaseWalletDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GenerateDistributedAutonomousDatabaseWalletRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GenerateDistributedAutonomousDatabaseWalletRequest + */ + public GenerateDistributedAutonomousDatabaseWalletRequest build() { + GenerateDistributedAutonomousDatabaseWalletRequest 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.distributeddatabasev26.model + .GenerateDistributedAutonomousDatabaseWalletDetails + body) { + generateDistributedAutonomousDatabaseWalletDetails(body); + return this; + } + + /** + * Build the instance of GenerateDistributedAutonomousDatabaseWalletRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GenerateDistributedAutonomousDatabaseWalletRequest + */ + public GenerateDistributedAutonomousDatabaseWalletRequest buildWithoutInvocationCallback() { + GenerateDistributedAutonomousDatabaseWalletRequest request = + new GenerateDistributedAutonomousDatabaseWalletRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.generateDistributedAutonomousDatabaseWalletDetails = + generateDistributedAutonomousDatabaseWalletDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new GenerateDistributedAutonomousDatabaseWalletRequest(distributedAutonomousDatabaseId, generateDistributedAutonomousDatabaseWalletDetails, opcRequestId, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .generateDistributedAutonomousDatabaseWalletDetails( + generateDistributedAutonomousDatabaseWalletDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",generateDistributedAutonomousDatabaseWalletDetails=") + .append(String.valueOf(this.generateDistributedAutonomousDatabaseWalletDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 GenerateDistributedAutonomousDatabaseWalletRequest)) { + return false; + } + + GenerateDistributedAutonomousDatabaseWalletRequest other = + (GenerateDistributedAutonomousDatabaseWalletRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.generateDistributedAutonomousDatabaseWalletDetails, + other.generateDistributedAutonomousDatabaseWalletDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.generateDistributedAutonomousDatabaseWalletDetails == null + ? 43 + : this.generateDistributedAutonomousDatabaseWalletDetails + .hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedDatabaseWalletRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedDatabaseWalletRequest.java new file mode 100644 index 0000000000..8f71db77b8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GenerateDistributedDatabaseWalletRequest.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GenerateDistributedDatabaseWalletRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedDatabaseWalletRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedDatabaseWalletDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Details for generating Globally distributed database wallet. + */ + private com.oracle.bmc.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + generateDistributedDatabaseWalletDetails; + + /** + * Details for generating Globally distributed database wallet. + */ + public com.oracle.bmc.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + getGenerateDistributedDatabaseWalletDetails() { + return generateDistributedDatabaseWalletDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + getBody$() { + return generateDistributedDatabaseWalletDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GenerateDistributedDatabaseWalletRequest, + com.oracle.bmc.distributeddatabasev26.model + .GenerateDistributedDatabaseWalletDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Details for generating Globally distributed database wallet. + */ + private com.oracle.bmc.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + generateDistributedDatabaseWalletDetails = null; + + /** + * Details for generating Globally distributed database wallet. + * @param generateDistributedDatabaseWalletDetails the value to set + * @return this builder instance + */ + public Builder generateDistributedDatabaseWalletDetails( + com.oracle.bmc.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + generateDistributedDatabaseWalletDetails) { + this.generateDistributedDatabaseWalletDetails = + generateDistributedDatabaseWalletDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(GenerateDistributedDatabaseWalletRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + generateDistributedDatabaseWalletDetails( + o.getGenerateDistributedDatabaseWalletDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GenerateDistributedDatabaseWalletRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GenerateDistributedDatabaseWalletRequest + */ + public GenerateDistributedDatabaseWalletRequest build() { + GenerateDistributedDatabaseWalletRequest 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.distributeddatabasev26.model.GenerateDistributedDatabaseWalletDetails + body) { + generateDistributedDatabaseWalletDetails(body); + return this; + } + + /** + * Build the instance of GenerateDistributedDatabaseWalletRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GenerateDistributedDatabaseWalletRequest + */ + public GenerateDistributedDatabaseWalletRequest buildWithoutInvocationCallback() { + GenerateDistributedDatabaseWalletRequest request = + new GenerateDistributedDatabaseWalletRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.generateDistributedDatabaseWalletDetails = + generateDistributedDatabaseWalletDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new GenerateDistributedDatabaseWalletRequest(distributedDatabaseId, generateDistributedDatabaseWalletDetails, opcRequestId, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .generateDistributedDatabaseWalletDetails(generateDistributedDatabaseWalletDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",generateDistributedDatabaseWalletDetails=") + .append(String.valueOf(this.generateDistributedDatabaseWalletDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 GenerateDistributedDatabaseWalletRequest)) { + return false; + } + + GenerateDistributedDatabaseWalletRequest other = + (GenerateDistributedDatabaseWalletRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.generateDistributedDatabaseWalletDetails, + other.generateDistributedDatabaseWalletDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.generateDistributedDatabaseWalletDetails == null + ? 43 + : this.generateDistributedDatabaseWalletDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRaftMetricRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRaftMetricRequest.java new file mode 100644 index 0000000000..3bb235cb0d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRaftMetricRequest.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedAutonomousDatabaseRaftMetricRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRaftMetricRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedAutonomousDatabaseRaftMetricRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedAutonomousDatabaseRaftMetricRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRaftMetricRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedAutonomousDatabaseRaftMetricRequest + */ + public GetDistributedAutonomousDatabaseRaftMetricRequest build() { + GetDistributedAutonomousDatabaseRaftMetricRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRaftMetricRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedAutonomousDatabaseRaftMetricRequest + */ + public GetDistributedAutonomousDatabaseRaftMetricRequest buildWithoutInvocationCallback() { + GetDistributedAutonomousDatabaseRaftMetricRequest request = + new GetDistributedAutonomousDatabaseRaftMetricRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedAutonomousDatabaseRaftMetricRequest(distributedAutonomousDatabaseId, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + 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 GetDistributedAutonomousDatabaseRaftMetricRequest)) { + return false; + } + + GetDistributedAutonomousDatabaseRaftMetricRequest other = + (GetDistributedAutonomousDatabaseRaftMetricRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..20b286be80 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + public String getMetadata() { + return metadata; + } + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + public String getIfNoneMatch() { + return ifNoneMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedAutonomousDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata = null; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + * @param metadata the value to set + * @return this builder instance + */ + public Builder metadata(String metadata) { + this.metadata = metadata; + return this; + } + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch = null; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + * @param ifNoneMatch the value to set + * @return this builder instance + */ + public Builder ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + metadata(o.getMetadata()); + ifNoneMatch(o.getIfNoneMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedAutonomousDatabaseRequest + */ + public GetDistributedAutonomousDatabaseRequest build() { + GetDistributedAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedAutonomousDatabaseRequest + */ + public GetDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + GetDistributedAutonomousDatabaseRequest request = + new GetDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.metadata = metadata; + request.ifNoneMatch = ifNoneMatch; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, metadata, ifNoneMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .metadata(metadata) + .ifNoneMatch(ifNoneMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",metadata=").append(String.valueOf(this.metadata)); + sb.append(",ifNoneMatch=").append(String.valueOf(this.ifNoneMatch)); + 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 GetDistributedAutonomousDatabaseRequest)) { + return false; + } + + GetDistributedAutonomousDatabaseRequest other = (GetDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.ifNoneMatch, other.ifNoneMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + (this.ifNoneMatch == null ? 43 : this.ifNoneMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRuChangeLogRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRuChangeLogRequest.java new file mode 100644 index 0000000000..ad61e786e4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedAutonomousDatabaseRuChangeLogRequest.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedAutonomousDatabaseRuChangeLogRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRuChangeLogRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The source shard name to filter RU change log entries. + * + */ + private String sourceShardName; + + /** + * The source shard name to filter RU change log entries. + * + */ + public String getSourceShardName() { + return sourceShardName; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedAutonomousDatabaseRuChangeLogRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * The source shard name to filter RU change log entries. + * + */ + private String sourceShardName = null; + + /** + * The source shard name to filter RU change log entries. + * + * @param sourceShardName the value to set + * @return this builder instance + */ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedAutonomousDatabaseRuChangeLogRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + sourceShardName(o.getSourceShardName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRuChangeLogRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedAutonomousDatabaseRuChangeLogRequest + */ + public GetDistributedAutonomousDatabaseRuChangeLogRequest build() { + GetDistributedAutonomousDatabaseRuChangeLogRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedAutonomousDatabaseRuChangeLogRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedAutonomousDatabaseRuChangeLogRequest + */ + public GetDistributedAutonomousDatabaseRuChangeLogRequest buildWithoutInvocationCallback() { + GetDistributedAutonomousDatabaseRuChangeLogRequest request = + new GetDistributedAutonomousDatabaseRuChangeLogRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.sourceShardName = sourceShardName; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedAutonomousDatabaseRuChangeLogRequest(distributedAutonomousDatabaseId, sourceShardName, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .sourceShardName(sourceShardName) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",sourceShardName=").append(String.valueOf(this.sourceShardName)); + 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 GetDistributedAutonomousDatabaseRuChangeLogRequest)) { + return false; + } + + GetDistributedAutonomousDatabaseRuChangeLogRequest other = + (GetDistributedAutonomousDatabaseRuChangeLogRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabasePrivateEndpointRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabasePrivateEndpointRequest.java new file mode 100644 index 0000000000..ce29a9d5e2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabasePrivateEndpointRequest.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedDatabasePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabasePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + public String getIfNoneMatch() { + return ifNoneMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedDatabasePrivateEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + return this; + } + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch = null; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + * @param ifNoneMatch the value to set + * @return this builder instance + */ + public Builder ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedDatabasePrivateEndpointRequest o) { + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + ifNoneMatch(o.getIfNoneMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedDatabasePrivateEndpointRequest + */ + public GetDistributedDatabasePrivateEndpointRequest build() { + GetDistributedDatabasePrivateEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedDatabasePrivateEndpointRequest + */ + public GetDistributedDatabasePrivateEndpointRequest buildWithoutInvocationCallback() { + GetDistributedDatabasePrivateEndpointRequest request = + new GetDistributedDatabasePrivateEndpointRequest(); + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.ifNoneMatch = ifNoneMatch; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedDatabasePrivateEndpointRequest(distributedDatabasePrivateEndpointId, ifNoneMatch, 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() + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .ifNoneMatch(ifNoneMatch) + .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(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",ifNoneMatch=").append(String.valueOf(this.ifNoneMatch)); + 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 GetDistributedDatabasePrivateEndpointRequest)) { + return false; + } + + GetDistributedDatabasePrivateEndpointRequest other = + (GetDistributedDatabasePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals(this.ifNoneMatch, other.ifNoneMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.hashCode()); + result = (result * PRIME) + (this.ifNoneMatch == null ? 43 : this.ifNoneMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRaftMetricRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRaftMetricRequest.java new file mode 100644 index 0000000000..25b8df18b8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRaftMetricRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedDatabaseRaftMetricRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRaftMetricRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedDatabaseRaftMetricRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedDatabaseRaftMetricRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedDatabaseRaftMetricRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedDatabaseRaftMetricRequest + */ + public GetDistributedDatabaseRaftMetricRequest build() { + GetDistributedDatabaseRaftMetricRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedDatabaseRaftMetricRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedDatabaseRaftMetricRequest + */ + public GetDistributedDatabaseRaftMetricRequest buildWithoutInvocationCallback() { + GetDistributedDatabaseRaftMetricRequest request = + new GetDistributedDatabaseRaftMetricRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedDatabaseRaftMetricRequest(distributedDatabaseId, 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() + .distributedDatabaseId(distributedDatabaseId) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + 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 GetDistributedDatabaseRaftMetricRequest)) { + return false; + } + + GetDistributedDatabaseRaftMetricRequest other = (GetDistributedDatabaseRaftMetricRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRequest.java new file mode 100644 index 0000000000..bb3d344f6a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRequest.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + public String getMetadata() { + return metadata; + } + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + public String getIfNoneMatch() { + return ifNoneMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata = null; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + * @param metadata the value to set + * @return this builder instance + */ + public Builder metadata(String metadata) { + this.metadata = metadata; + return this; + } + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + */ + private String ifNoneMatch = null; + + /** + * For conditional requests. In the GET call for a resource, set the + * {@code If-None-Match} header to the value of the ETag from a previous GET (or + * POST or PUT) response for that resource. The server will return with + * either a 304 Not Modified response if the resource has not changed, or a + * 200 OK response with the updated representation. + * + * @param ifNoneMatch the value to set + * @return this builder instance + */ + public Builder ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + metadata(o.getMetadata()); + ifNoneMatch(o.getIfNoneMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedDatabaseRequest + */ + public GetDistributedDatabaseRequest build() { + GetDistributedDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedDatabaseRequest + */ + public GetDistributedDatabaseRequest buildWithoutInvocationCallback() { + GetDistributedDatabaseRequest request = new GetDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.metadata = metadata; + request.ifNoneMatch = ifNoneMatch; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedDatabaseRequest(distributedDatabaseId, metadata, ifNoneMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .metadata(metadata) + .ifNoneMatch(ifNoneMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",metadata=").append(String.valueOf(this.metadata)); + sb.append(",ifNoneMatch=").append(String.valueOf(this.ifNoneMatch)); + 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 GetDistributedDatabaseRequest)) { + return false; + } + + GetDistributedDatabaseRequest other = (GetDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.ifNoneMatch, other.ifNoneMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + (this.ifNoneMatch == null ? 43 : this.ifNoneMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRuChangeLogRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRuChangeLogRequest.java new file mode 100644 index 0000000000..b565228eb7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetDistributedDatabaseRuChangeLogRequest.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetDistributedDatabaseRuChangeLogRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRuChangeLogRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The source shard name to filter RU change log entries. + * + */ + private String sourceShardName; + + /** + * The source shard name to filter RU change log entries. + * + */ + public String getSourceShardName() { + return sourceShardName; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDistributedDatabaseRuChangeLogRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * The source shard name to filter RU change log entries. + * + */ + private String sourceShardName = null; + + /** + * The source shard name to filter RU change log entries. + * + * @param sourceShardName the value to set + * @return this builder instance + */ + public Builder sourceShardName(String sourceShardName) { + this.sourceShardName = sourceShardName; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetDistributedDatabaseRuChangeLogRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + sourceShardName(o.getSourceShardName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDistributedDatabaseRuChangeLogRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDistributedDatabaseRuChangeLogRequest + */ + public GetDistributedDatabaseRuChangeLogRequest build() { + GetDistributedDatabaseRuChangeLogRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDistributedDatabaseRuChangeLogRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDistributedDatabaseRuChangeLogRequest + */ + public GetDistributedDatabaseRuChangeLogRequest buildWithoutInvocationCallback() { + GetDistributedDatabaseRuChangeLogRequest request = + new GetDistributedDatabaseRuChangeLogRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.sourceShardName = sourceShardName; + request.opcRequestId = opcRequestId; + return request; + // new GetDistributedDatabaseRuChangeLogRequest(distributedDatabaseId, sourceShardName, 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() + .distributedDatabaseId(distributedDatabaseId) + .sourceShardName(sourceShardName) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",sourceShardName=").append(String.valueOf(this.sourceShardName)); + 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 GetDistributedDatabaseRuChangeLogRequest)) { + return false; + } + + GetDistributedDatabaseRuChangeLogRequest other = + (GetDistributedDatabaseRuChangeLogRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.sourceShardName, other.sourceShardName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.sourceShardName == null ? 43 : this.sourceShardName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetWorkRequestRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetWorkRequestRequest.java new file mode 100644 index 0000000000..97a5bfcaea --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/GetWorkRequestRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest buildWithoutInvocationCallback() { + GetWorkRequestRequest request = new GetWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestRequest(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 GetWorkRequestRequest)) { + return false; + } + + GetWorkRequestRequest other = (GetWorkRequestRequest) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedAutonomousDatabasesRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedAutonomousDatabasesRequest.java new file mode 100644 index 0000000000..0ed346b969 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedAutonomousDatabasesRequest.java @@ -0,0 +1,621 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListDistributedAutonomousDatabasesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedAutonomousDatabasesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + private String privateEndpointId; + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + public String getPrivateEndpointId() { + return privateEndpointId; + } + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase.LifecycleState + lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + TimeUpdated("timeUpdated"), + ; + + 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 timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + private Boolean isAutoResourceManagementEnabled; + + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + public Boolean getIsAutoResourceManagementEnabled() { + return isAutoResourceManagementEnabled; + } + /** + * A filter to return only Globally distributed autonomous databases that match the entire name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only Globally distributed autonomous databases that match the entire name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + private String dbDeploymentType; + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + public String getDbDeploymentType() { + return dbDeploymentType; + } + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + public String getMetadata() { + return metadata; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDistributedAutonomousDatabasesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID 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; + } + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree = null; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + private String privateEndpointId = null; + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + * @param privateEndpointId the value to set + * @return this builder instance + */ + public Builder privateEndpointId(String privateEndpointId) { + this.privateEndpointId = privateEndpointId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + .LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + 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 filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + private Boolean isAutoResourceManagementEnabled = null; + + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + * @param isAutoResourceManagementEnabled the value to set + * @return this builder instance + */ + public Builder isAutoResourceManagementEnabled(Boolean isAutoResourceManagementEnabled) { + this.isAutoResourceManagementEnabled = isAutoResourceManagementEnabled; + return this; + } + + /** + * A filter to return only Globally distributed autonomous databases that match the entire name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only Globally distributed autonomous databases that match the entire name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + private String dbDeploymentType = null; + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + * @param dbDeploymentType the value to set + * @return this builder instance + */ + public Builder dbDeploymentType(String dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + return this; + } + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata = null; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + * @param metadata the value to set + * @return this builder instance + */ + public Builder metadata(String metadata) { + this.metadata = metadata; + 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.util.internal.Consumer + 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(ListDistributedAutonomousDatabasesRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + privateEndpointId(o.getPrivateEndpointId()); + lifecycleState(o.getLifecycleState()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + isAutoResourceManagementEnabled(o.getIsAutoResourceManagementEnabled()); + displayName(o.getDisplayName()); + dbDeploymentType(o.getDbDeploymentType()); + metadata(o.getMetadata()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDistributedAutonomousDatabasesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDistributedAutonomousDatabasesRequest + */ + public ListDistributedAutonomousDatabasesRequest build() { + ListDistributedAutonomousDatabasesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDistributedAutonomousDatabasesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDistributedAutonomousDatabasesRequest + */ + public ListDistributedAutonomousDatabasesRequest buildWithoutInvocationCallback() { + ListDistributedAutonomousDatabasesRequest request = + new ListDistributedAutonomousDatabasesRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.privateEndpointId = privateEndpointId; + request.lifecycleState = lifecycleState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + request.isAutoResourceManagementEnabled = isAutoResourceManagementEnabled; + request.displayName = displayName; + request.dbDeploymentType = dbDeploymentType; + request.metadata = metadata; + return request; + // new ListDistributedAutonomousDatabasesRequest(compartmentId, compartmentIdInSubtree, privateEndpointId, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId, isAutoResourceManagementEnabled, displayName, dbDeploymentType, metadata); + } + } + + /** + * 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) + .compartmentIdInSubtree(compartmentIdInSubtree) + .privateEndpointId(privateEndpointId) + .lifecycleState(lifecycleState) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId) + .isAutoResourceManagementEnabled(isAutoResourceManagementEnabled) + .displayName(displayName) + .dbDeploymentType(dbDeploymentType) + .metadata(metadata); + } + + /** + * 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(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",privateEndpointId=").append(String.valueOf(this.privateEndpointId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + 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(",isAutoResourceManagementEnabled=") + .append(String.valueOf(this.isAutoResourceManagementEnabled)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + 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 ListDistributedAutonomousDatabasesRequest)) { + return false; + } + + ListDistributedAutonomousDatabasesRequest other = + (ListDistributedAutonomousDatabasesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.privateEndpointId, other.privateEndpointId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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) + && java.util.Objects.equals( + this.isAutoResourceManagementEnabled, other.isAutoResourceManagementEnabled) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && java.util.Objects.equals(this.metadata, other.metadata); + } + + @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.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointId == null ? 43 : this.privateEndpointId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.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()); + result = + (result * PRIME) + + (this.isAutoResourceManagementEnabled == null + ? 43 + : this.isAutoResourceManagementEnabled.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasePrivateEndpointsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasePrivateEndpointsRequest.java new file mode 100644 index 0000000000..636f778428 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasePrivateEndpointsRequest.java @@ -0,0 +1,482 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListDistributedDatabasePrivateEndpointsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasePrivateEndpointsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .LifecycleState + lifecycleState; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + TimeUpdated("timeUpdated"), + ; + + 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 timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only private endpoint that match the entire name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only private endpoint that match the entire name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDistributedDatabasePrivateEndpointsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID 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; + } + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree = null; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + .LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + 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 filter to return only private endpoint that match the entire name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only private endpoint that match the entire name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + 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.util.internal.Consumer + 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(ListDistributedDatabasePrivateEndpointsRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + lifecycleState(o.getLifecycleState()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDistributedDatabasePrivateEndpointsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDistributedDatabasePrivateEndpointsRequest + */ + public ListDistributedDatabasePrivateEndpointsRequest build() { + ListDistributedDatabasePrivateEndpointsRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDistributedDatabasePrivateEndpointsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDistributedDatabasePrivateEndpointsRequest + */ + public ListDistributedDatabasePrivateEndpointsRequest buildWithoutInvocationCallback() { + ListDistributedDatabasePrivateEndpointsRequest request = + new ListDistributedDatabasePrivateEndpointsRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.lifecycleState = lifecycleState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + request.displayName = displayName; + return request; + // new ListDistributedDatabasePrivateEndpointsRequest(compartmentId, compartmentIdInSubtree, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId, displayName); + } + } + + /** + * 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) + .compartmentIdInSubtree(compartmentIdInSubtree) + .lifecycleState(lifecycleState) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId) + .displayName(displayName); + } + + /** + * 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(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + 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(",displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDistributedDatabasePrivateEndpointsRequest)) { + return false; + } + + ListDistributedDatabasePrivateEndpointsRequest other = + (ListDistributedDatabasePrivateEndpointsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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) + && java.util.Objects.equals(this.displayName, other.displayName); + } + + @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.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.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()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasesRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasesRequest.java new file mode 100644 index 0000000000..b8d8d4aada --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListDistributedDatabasesRequest.java @@ -0,0 +1,617 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListDistributedDatabasesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + private String privateEndpointId; + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + public String getPrivateEndpointId() { + return privateEndpointId; + } + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase.LifecycleState + lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + TimeUpdated("timeUpdated"), + ; + + 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 timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + private Boolean isAutoResourceManagementEnabled; + + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + public Boolean getIsAutoResourceManagementEnabled() { + return isAutoResourceManagementEnabled; + } + /** + * A filter to return only Globally distributed databases that match the entire name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only Globally distributed databases that match the entire name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + private String dbDeploymentType; + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + public String getDbDeploymentType() { + return dbDeploymentType; + } + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + public String getMetadata() { + return metadata; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDistributedDatabasesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID 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; + } + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + */ + private Boolean compartmentIdInSubtree = null; + + /** + * When set to true, returns resources in the specified compartment and in all of its child compartments recursively. Defaults to false. + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + */ + private String privateEndpointId = null; + + /** + * A filter to return only resources that are associated with the given privateEndpointId. + * @param privateEndpointId the value to set + * @return this builder instance + */ + public Builder privateEndpointId(String privateEndpointId) { + this.privateEndpointId = privateEndpointId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the specified value. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + 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 filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + */ + private Boolean isAutoResourceManagementEnabled = null; + + /** + * A filter to return only resources where autoResourceManagement is enabled when set to {@code true}, or disabled when set to {@code false}. If omitted, no autoResourceManagement-based filtering is applied. + * @param isAutoResourceManagementEnabled the value to set + * @return this builder instance + */ + public Builder isAutoResourceManagementEnabled(Boolean isAutoResourceManagementEnabled) { + this.isAutoResourceManagementEnabled = isAutoResourceManagementEnabled; + return this; + } + + /** + * A filter to return only Globally distributed databases that match the entire name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only Globally distributed databases that match the entire name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + */ + private String dbDeploymentType = null; + + /** + * A filter to return only resources whose dbDeploymentType matches the specified value. + * @param dbDeploymentType the value to set + * @return this builder instance + */ + public Builder dbDeploymentType(String dbDeploymentType) { + this.dbDeploymentType = dbDeploymentType; + return this; + } + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + */ + private String metadata = null; + + /** + * Comma-separated argument names for which metadata should be retrieved. + * + * @param metadata the value to set + * @return this builder instance + */ + public Builder metadata(String metadata) { + this.metadata = metadata; + 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.util.internal.Consumer + 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(ListDistributedDatabasesRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + privateEndpointId(o.getPrivateEndpointId()); + lifecycleState(o.getLifecycleState()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + isAutoResourceManagementEnabled(o.getIsAutoResourceManagementEnabled()); + displayName(o.getDisplayName()); + dbDeploymentType(o.getDbDeploymentType()); + metadata(o.getMetadata()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDistributedDatabasesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDistributedDatabasesRequest + */ + public ListDistributedDatabasesRequest build() { + ListDistributedDatabasesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDistributedDatabasesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDistributedDatabasesRequest + */ + public ListDistributedDatabasesRequest buildWithoutInvocationCallback() { + ListDistributedDatabasesRequest request = new ListDistributedDatabasesRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.privateEndpointId = privateEndpointId; + request.lifecycleState = lifecycleState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + request.isAutoResourceManagementEnabled = isAutoResourceManagementEnabled; + request.displayName = displayName; + request.dbDeploymentType = dbDeploymentType; + request.metadata = metadata; + return request; + // new ListDistributedDatabasesRequest(compartmentId, compartmentIdInSubtree, privateEndpointId, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId, isAutoResourceManagementEnabled, displayName, dbDeploymentType, metadata); + } + } + + /** + * 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) + .compartmentIdInSubtree(compartmentIdInSubtree) + .privateEndpointId(privateEndpointId) + .lifecycleState(lifecycleState) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId) + .isAutoResourceManagementEnabled(isAutoResourceManagementEnabled) + .displayName(displayName) + .dbDeploymentType(dbDeploymentType) + .metadata(metadata); + } + + /** + * 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(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",privateEndpointId=").append(String.valueOf(this.privateEndpointId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + 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(",isAutoResourceManagementEnabled=") + .append(String.valueOf(this.isAutoResourceManagementEnabled)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",dbDeploymentType=").append(String.valueOf(this.dbDeploymentType)); + 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 ListDistributedDatabasesRequest)) { + return false; + } + + ListDistributedDatabasesRequest other = (ListDistributedDatabasesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.privateEndpointId, other.privateEndpointId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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) + && java.util.Objects.equals( + this.isAutoResourceManagementEnabled, other.isAutoResourceManagementEnabled) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.dbDeploymentType, other.dbDeploymentType) + && java.util.Objects.equals(this.metadata, other.metadata); + } + + @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.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointId == null ? 43 : this.privateEndpointId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.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()); + result = + (result * PRIME) + + (this.isAutoResourceManagementEnabled == null + ? 43 + : this.isAutoResourceManagementEnabled.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.dbDeploymentType == null ? 43 : this.dbDeploymentType.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestErrorsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 0000000000..9896e6589b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + 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 timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + 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 representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @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 timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for 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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.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.util.internal.Consumer + 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(ListWorkRequestErrorsRequest 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 ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListWorkRequestErrorsRequest request = new ListWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestErrorsRequest(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 ListWorkRequestErrorsRequest)) { + return false; + } + + ListWorkRequestErrorsRequest other = (ListWorkRequestErrorsRequest) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestLogsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 0000000000..8d35f09119 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + 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 timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + 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 representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @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 timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for 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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.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.util.internal.Consumer + 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(ListWorkRequestLogsRequest 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 ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListWorkRequestLogsRequest request = new ListWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestLogsRequest(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 ListWorkRequestLogsRequest)) { + return false; + } + + ListWorkRequestLogsRequest other = (ListWorkRequestLogsRequest) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestsRequest.java new file mode 100644 index 0000000000..0b88f736c2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ListWorkRequestsRequest.java @@ -0,0 +1,463 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The ID of the asynchronous work request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + */ + private com.oracle.bmc.distributeddatabasev26.model.OperationStatus status; + + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + */ + public com.oracle.bmc.distributeddatabasev26.model.OperationStatus getStatus() { + return status; + } + /** + * The ID of the resource affected by the work request. + */ + private String resourceId; + + /** + * The ID of the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.distributeddatabasev26.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + **/ + public enum SortBy { + 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 timeAccepted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID 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 ID of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The ID 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 resources their lifecycleState matches the given OperationStatus. + */ + private com.oracle.bmc.distributeddatabasev26.model.OperationStatus status = null; + + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.distributeddatabasev26.model.OperationStatus status) { + this.status = status; + return this; + } + + /** + * The ID of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The ID 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; + } + + /** + * 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 representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.distributeddatabasev26.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for 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.util.internal.Consumer + 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(ListWorkRequestsRequest 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 ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest buildWithoutInvocationCallback() { + ListWorkRequestsRequest request = new ListWorkRequestsRequest(); + 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 ListWorkRequestsRequest(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 ListWorkRequestsRequest)) { + return false; + } + + ListWorkRequestsRequest other = (ListWorkRequestsRequest) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedAutonomousDatabaseReplicationUnitRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedAutonomousDatabaseReplicationUnitRequest.java new file mode 100644 index 0000000000..7ffe9311fe --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedAutonomousDatabaseReplicationUnitRequest.java @@ -0,0 +1,401 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use MoveDistributedAutonomousDatabaseReplicationUnitRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedAutonomousDatabaseReplicationUnitRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Details required to move the replication units from the source shard to destination shard. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + moveDistributedAutonomousDatabaseReplicationUnitDetails; + + /** + * Details required to move the replication units from the source shard to destination shard. + * + */ + public com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + getMoveDistributedAutonomousDatabaseReplicationUnitDetails() { + return moveDistributedAutonomousDatabaseReplicationUnitDetails; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + getBody$() { + return moveDistributedAutonomousDatabaseReplicationUnitDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + MoveDistributedAutonomousDatabaseReplicationUnitRequest, + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Details required to move the replication units from the source shard to destination shard. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + moveDistributedAutonomousDatabaseReplicationUnitDetails = null; + + /** + * Details required to move the replication units from the source shard to destination shard. + * + * @param moveDistributedAutonomousDatabaseReplicationUnitDetails the value to set + * @return this builder instance + */ + public Builder moveDistributedAutonomousDatabaseReplicationUnitDetails( + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + moveDistributedAutonomousDatabaseReplicationUnitDetails) { + this.moveDistributedAutonomousDatabaseReplicationUnitDetails = + moveDistributedAutonomousDatabaseReplicationUnitDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(MoveDistributedAutonomousDatabaseReplicationUnitRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + moveDistributedAutonomousDatabaseReplicationUnitDetails( + o.getMoveDistributedAutonomousDatabaseReplicationUnitDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MoveDistributedAutonomousDatabaseReplicationUnitRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of MoveDistributedAutonomousDatabaseReplicationUnitRequest + */ + public MoveDistributedAutonomousDatabaseReplicationUnitRequest build() { + MoveDistributedAutonomousDatabaseReplicationUnitRequest 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.distributeddatabasev26.model + .MoveDistributedAutonomousDatabaseReplicationUnitDetails + body) { + moveDistributedAutonomousDatabaseReplicationUnitDetails(body); + return this; + } + + /** + * Build the instance of MoveDistributedAutonomousDatabaseReplicationUnitRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of MoveDistributedAutonomousDatabaseReplicationUnitRequest + */ + public MoveDistributedAutonomousDatabaseReplicationUnitRequest + buildWithoutInvocationCallback() { + MoveDistributedAutonomousDatabaseReplicationUnitRequest request = + new MoveDistributedAutonomousDatabaseReplicationUnitRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.moveDistributedAutonomousDatabaseReplicationUnitDetails = + moveDistributedAutonomousDatabaseReplicationUnitDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new MoveDistributedAutonomousDatabaseReplicationUnitRequest(distributedAutonomousDatabaseId, moveDistributedAutonomousDatabaseReplicationUnitDetails, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .moveDistributedAutonomousDatabaseReplicationUnitDetails( + moveDistributedAutonomousDatabaseReplicationUnitDetails) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",moveDistributedAutonomousDatabaseReplicationUnitDetails=") + .append( + String.valueOf( + this.moveDistributedAutonomousDatabaseReplicationUnitDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 MoveDistributedAutonomousDatabaseReplicationUnitRequest)) { + return false; + } + + MoveDistributedAutonomousDatabaseReplicationUnitRequest other = + (MoveDistributedAutonomousDatabaseReplicationUnitRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.moveDistributedAutonomousDatabaseReplicationUnitDetails, + other.moveDistributedAutonomousDatabaseReplicationUnitDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.moveDistributedAutonomousDatabaseReplicationUnitDetails == null + ? 43 + : this.moveDistributedAutonomousDatabaseReplicationUnitDetails + .hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedDatabaseReplicationUnitRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedDatabaseReplicationUnitRequest.java new file mode 100644 index 0000000000..b8397fcf1f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/MoveDistributedDatabaseReplicationUnitRequest.java @@ -0,0 +1,393 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use MoveDistributedDatabaseReplicationUnitRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedDatabaseReplicationUnitRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Details required to move the replication units from source shard to destination shard. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails + moveDistributedDatabaseReplicationUnitDetails; + + /** + * Details required to move the replication units from source shard to destination shard. + * + */ + public com.oracle.bmc.distributeddatabasev26.model.MoveDistributedDatabaseReplicationUnitDetails + getMoveDistributedDatabaseReplicationUnitDetails() { + return moveDistributedDatabaseReplicationUnitDetails; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.MoveDistributedDatabaseReplicationUnitDetails + getBody$() { + return moveDistributedDatabaseReplicationUnitDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + MoveDistributedDatabaseReplicationUnitRequest, + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Details required to move the replication units from source shard to destination shard. + * + */ + private com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails + moveDistributedDatabaseReplicationUnitDetails = null; + + /** + * Details required to move the replication units from source shard to destination shard. + * + * @param moveDistributedDatabaseReplicationUnitDetails the value to set + * @return this builder instance + */ + public Builder moveDistributedDatabaseReplicationUnitDetails( + com.oracle.bmc.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails + moveDistributedDatabaseReplicationUnitDetails) { + this.moveDistributedDatabaseReplicationUnitDetails = + moveDistributedDatabaseReplicationUnitDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(MoveDistributedDatabaseReplicationUnitRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + moveDistributedDatabaseReplicationUnitDetails( + o.getMoveDistributedDatabaseReplicationUnitDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MoveDistributedDatabaseReplicationUnitRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of MoveDistributedDatabaseReplicationUnitRequest + */ + public MoveDistributedDatabaseReplicationUnitRequest build() { + MoveDistributedDatabaseReplicationUnitRequest 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.distributeddatabasev26.model + .MoveDistributedDatabaseReplicationUnitDetails + body) { + moveDistributedDatabaseReplicationUnitDetails(body); + return this; + } + + /** + * Build the instance of MoveDistributedDatabaseReplicationUnitRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of MoveDistributedDatabaseReplicationUnitRequest + */ + public MoveDistributedDatabaseReplicationUnitRequest buildWithoutInvocationCallback() { + MoveDistributedDatabaseReplicationUnitRequest request = + new MoveDistributedDatabaseReplicationUnitRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.moveDistributedDatabaseReplicationUnitDetails = + moveDistributedDatabaseReplicationUnitDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new MoveDistributedDatabaseReplicationUnitRequest(distributedDatabaseId, moveDistributedDatabaseReplicationUnitDetails, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .moveDistributedDatabaseReplicationUnitDetails( + moveDistributedDatabaseReplicationUnitDetails) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",moveDistributedDatabaseReplicationUnitDetails=") + .append(String.valueOf(this.moveDistributedDatabaseReplicationUnitDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 MoveDistributedDatabaseReplicationUnitRequest)) { + return false; + } + + MoveDistributedDatabaseReplicationUnitRequest other = + (MoveDistributedDatabaseReplicationUnitRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.moveDistributedDatabaseReplicationUnitDetails, + other.moveDistributedDatabaseReplicationUnitDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.moveDistributedDatabaseReplicationUnitDetails == null + ? 43 + : this.moveDistributedDatabaseReplicationUnitDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..468f1f6299 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,389 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use PatchDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedAutonomousDatabaseDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The payload containing instructions to patch the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model.PatchDistributedAutonomousDatabaseDetails + patchDistributedAutonomousDatabaseDetails; + + /** + * The payload containing instructions to patch the Globally distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model.PatchDistributedAutonomousDatabaseDetails + getPatchDistributedAutonomousDatabaseDetails() { + return patchDistributedAutonomousDatabaseDetails; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.PatchDistributedAutonomousDatabaseDetails + getBody$() { + return patchDistributedAutonomousDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchDistributedAutonomousDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedAutonomousDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * The payload containing instructions to patch the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedAutonomousDatabaseDetails + patchDistributedAutonomousDatabaseDetails = null; + + /** + * The payload containing instructions to patch the Globally distributed autonomous database. + * @param patchDistributedAutonomousDatabaseDetails the value to set + * @return this builder instance + */ + public Builder patchDistributedAutonomousDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedAutonomousDatabaseDetails + patchDistributedAutonomousDatabaseDetails) { + this.patchDistributedAutonomousDatabaseDetails = + patchDistributedAutonomousDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(PatchDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + patchDistributedAutonomousDatabaseDetails( + o.getPatchDistributedAutonomousDatabaseDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchDistributedAutonomousDatabaseRequest + */ + public PatchDistributedAutonomousDatabaseRequest build() { + PatchDistributedAutonomousDatabaseRequest 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.distributeddatabasev26.model + .PatchDistributedAutonomousDatabaseDetails + body) { + patchDistributedAutonomousDatabaseDetails(body); + return this; + } + + /** + * Build the instance of PatchDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchDistributedAutonomousDatabaseRequest + */ + public PatchDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + PatchDistributedAutonomousDatabaseRequest request = + new PatchDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.patchDistributedAutonomousDatabaseDetails = + patchDistributedAutonomousDatabaseDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new PatchDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, patchDistributedAutonomousDatabaseDetails, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .patchDistributedAutonomousDatabaseDetails( + patchDistributedAutonomousDatabaseDetails) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",patchDistributedAutonomousDatabaseDetails=") + .append(String.valueOf(this.patchDistributedAutonomousDatabaseDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 PatchDistributedAutonomousDatabaseRequest)) { + return false; + } + + PatchDistributedAutonomousDatabaseRequest other = + (PatchDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.patchDistributedAutonomousDatabaseDetails, + other.patchDistributedAutonomousDatabaseDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.patchDistributedAutonomousDatabaseDetails == null + ? 43 + : this.patchDistributedAutonomousDatabaseDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabasePrivateEndpointRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabasePrivateEndpointRequest.java new file mode 100644 index 0000000000..0b21096059 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabasePrivateEndpointRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use PatchDistributedDatabasePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabasePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails> { + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * The payload containing instructions to patch the DistributedDatabasePrivateEndpoint. + */ + private com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + patchDistributedDatabasePrivateEndpointDetails; + + /** + * The payload containing instructions to patch the DistributedDatabasePrivateEndpoint. + */ + public com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + getPatchDistributedDatabasePrivateEndpointDetails() { + return patchDistributedDatabasePrivateEndpointDetails; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + getBody$() { + return patchDistributedDatabasePrivateEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchDistributedDatabasePrivateEndpointRequest, + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + return this; + } + + /** + * The payload containing instructions to patch the DistributedDatabasePrivateEndpoint. + */ + private com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + patchDistributedDatabasePrivateEndpointDetails = null; + + /** + * The payload containing instructions to patch the DistributedDatabasePrivateEndpoint. + * @param patchDistributedDatabasePrivateEndpointDetails the value to set + * @return this builder instance + */ + public Builder patchDistributedDatabasePrivateEndpointDetails( + com.oracle.bmc.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + patchDistributedDatabasePrivateEndpointDetails) { + this.patchDistributedDatabasePrivateEndpointDetails = + patchDistributedDatabasePrivateEndpointDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(PatchDistributedDatabasePrivateEndpointRequest o) { + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + patchDistributedDatabasePrivateEndpointDetails( + o.getPatchDistributedDatabasePrivateEndpointDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchDistributedDatabasePrivateEndpointRequest + */ + public PatchDistributedDatabasePrivateEndpointRequest build() { + PatchDistributedDatabasePrivateEndpointRequest 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.distributeddatabasev26.model + .PatchDistributedDatabasePrivateEndpointDetails + body) { + patchDistributedDatabasePrivateEndpointDetails(body); + return this; + } + + /** + * Build the instance of PatchDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchDistributedDatabasePrivateEndpointRequest + */ + public PatchDistributedDatabasePrivateEndpointRequest buildWithoutInvocationCallback() { + PatchDistributedDatabasePrivateEndpointRequest request = + new PatchDistributedDatabasePrivateEndpointRequest(); + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.patchDistributedDatabasePrivateEndpointDetails = + patchDistributedDatabasePrivateEndpointDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new PatchDistributedDatabasePrivateEndpointRequest(distributedDatabasePrivateEndpointId, patchDistributedDatabasePrivateEndpointDetails, ifMatch, 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() + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .patchDistributedDatabasePrivateEndpointDetails( + patchDistributedDatabasePrivateEndpointDetails) + .ifMatch(ifMatch) + .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(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",patchDistributedDatabasePrivateEndpointDetails=") + .append(String.valueOf(this.patchDistributedDatabasePrivateEndpointDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 PatchDistributedDatabasePrivateEndpointRequest)) { + return false; + } + + PatchDistributedDatabasePrivateEndpointRequest other = + (PatchDistributedDatabasePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals( + this.patchDistributedDatabasePrivateEndpointDetails, + other.patchDistributedDatabasePrivateEndpointDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.hashCode()); + result = + (result * PRIME) + + (this.patchDistributedDatabasePrivateEndpointDetails == null + ? 43 + : this.patchDistributedDatabasePrivateEndpointDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabaseRequest.java new file mode 100644 index 0000000000..1eee14978b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/PatchDistributedDatabaseRequest.java @@ -0,0 +1,373 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use PatchDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The payload containing instructions to patch the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails + patchDistributedDatabaseDetails; + + /** + * The payload containing instructions to patch the Globally distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails + getPatchDistributedDatabaseDetails() { + return patchDistributedDatabaseDetails; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails getBody$() { + return patchDistributedDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchDistributedDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * The payload containing instructions to patch the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails + patchDistributedDatabaseDetails = null; + + /** + * The payload containing instructions to patch the Globally distributed database. + * @param patchDistributedDatabaseDetails the value to set + * @return this builder instance + */ + public Builder patchDistributedDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model.PatchDistributedDatabaseDetails + patchDistributedDatabaseDetails) { + this.patchDistributedDatabaseDetails = patchDistributedDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(PatchDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + patchDistributedDatabaseDetails(o.getPatchDistributedDatabaseDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchDistributedDatabaseRequest + */ + public PatchDistributedDatabaseRequest build() { + PatchDistributedDatabaseRequest 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.distributeddatabasev26.model.PatchDistributedDatabaseDetails body) { + patchDistributedDatabaseDetails(body); + return this; + } + + /** + * Build the instance of PatchDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchDistributedDatabaseRequest + */ + public PatchDistributedDatabaseRequest buildWithoutInvocationCallback() { + PatchDistributedDatabaseRequest request = new PatchDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.patchDistributedDatabaseDetails = patchDistributedDatabaseDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new PatchDistributedDatabaseRequest(distributedDatabaseId, patchDistributedDatabaseDetails, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .patchDistributedDatabaseDetails(patchDistributedDatabaseDetails) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",patchDistributedDatabaseDetails=") + .append(String.valueOf(this.patchDistributedDatabaseDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 PatchDistributedDatabaseRequest)) { + return false; + } + + PatchDistributedDatabaseRequest other = (PatchDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.patchDistributedDatabaseDetails, other.patchDistributedDatabaseDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.patchDistributedDatabaseDetails == null + ? 43 + : this.patchDistributedDatabaseDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedAutonomousDatabaseResourceRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedAutonomousDatabaseResourceRequest.java new file mode 100644 index 0000000000..46fe040ff9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedAutonomousDatabaseResourceRequest.java @@ -0,0 +1,348 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use RecreateFailedDistributedAutonomousDatabaseResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedAutonomousDatabaseResourceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + private String resourceName; + + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + public String getResourceName() { + return resourceName; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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< + RecreateFailedDistributedAutonomousDatabaseResourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + private String resourceName = null; + + /** + * Specify the name of the shard, catalog, or GSM. + * + * @param resourceName the value to set + * @return this builder instance + */ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(RecreateFailedDistributedAutonomousDatabaseResourceRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + resourceName(o.getResourceName()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RecreateFailedDistributedAutonomousDatabaseResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RecreateFailedDistributedAutonomousDatabaseResourceRequest + */ + public RecreateFailedDistributedAutonomousDatabaseResourceRequest build() { + RecreateFailedDistributedAutonomousDatabaseResourceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of RecreateFailedDistributedAutonomousDatabaseResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RecreateFailedDistributedAutonomousDatabaseResourceRequest + */ + public RecreateFailedDistributedAutonomousDatabaseResourceRequest + buildWithoutInvocationCallback() { + RecreateFailedDistributedAutonomousDatabaseResourceRequest request = + new RecreateFailedDistributedAutonomousDatabaseResourceRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.resourceName = resourceName; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new RecreateFailedDistributedAutonomousDatabaseResourceRequest(distributedAutonomousDatabaseId, resourceName, opcRequestId, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .resourceName(resourceName) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",resourceName=").append(String.valueOf(this.resourceName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 RecreateFailedDistributedAutonomousDatabaseResourceRequest)) { + return false; + } + + RecreateFailedDistributedAutonomousDatabaseResourceRequest other = + (RecreateFailedDistributedAutonomousDatabaseResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedDatabaseResourceRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedDatabaseResourceRequest.java new file mode 100644 index 0000000000..d0c7476fe2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RecreateFailedDistributedDatabaseResourceRequest.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use RecreateFailedDistributedDatabaseResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedDatabaseResourceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + private String resourceName; + + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + public String getResourceName() { + return resourceName; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RecreateFailedDistributedDatabaseResourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Specify the name of the shard, catalog, or GSM. + * + */ + private String resourceName = null; + + /** + * Specify the name of the shard, catalog, or GSM. + * + * @param resourceName the value to set + * @return this builder instance + */ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(RecreateFailedDistributedDatabaseResourceRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + resourceName(o.getResourceName()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RecreateFailedDistributedDatabaseResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RecreateFailedDistributedDatabaseResourceRequest + */ + public RecreateFailedDistributedDatabaseResourceRequest build() { + RecreateFailedDistributedDatabaseResourceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of RecreateFailedDistributedDatabaseResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RecreateFailedDistributedDatabaseResourceRequest + */ + public RecreateFailedDistributedDatabaseResourceRequest buildWithoutInvocationCallback() { + RecreateFailedDistributedDatabaseResourceRequest request = + new RecreateFailedDistributedDatabaseResourceRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.resourceName = resourceName; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new RecreateFailedDistributedDatabaseResourceRequest(distributedDatabaseId, resourceName, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .resourceName(resourceName) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",resourceName=").append(String.valueOf(this.resourceName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 RecreateFailedDistributedDatabaseResourceRequest)) { + return false; + } + + RecreateFailedDistributedDatabaseResourceRequest other = + (RecreateFailedDistributedDatabaseResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ReinstateProxyInstanceRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ReinstateProxyInstanceRequest.java new file mode 100644 index 0000000000..7de61fcd88 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ReinstateProxyInstanceRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ReinstateProxyInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ReinstateProxyInstanceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + /** + * 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< + ReinstateProxyInstanceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ReinstateProxyInstanceRequest o) { + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReinstateProxyInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReinstateProxyInstanceRequest + */ + public ReinstateProxyInstanceRequest build() { + ReinstateProxyInstanceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ReinstateProxyInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReinstateProxyInstanceRequest + */ + public ReinstateProxyInstanceRequest buildWithoutInvocationCallback() { + ReinstateProxyInstanceRequest request = new ReinstateProxyInstanceRequest(); + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ReinstateProxyInstanceRequest(distributedDatabasePrivateEndpointId, opcRequestId, ifMatch, 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() + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .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(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ReinstateProxyInstanceRequest)) { + return false; + } + + ReinstateProxyInstanceRequest other = (ReinstateProxyInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedAutonomousDatabasePasswordsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedAutonomousDatabasePasswordsRequest.java new file mode 100644 index 0000000000..68e020452b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedAutonomousDatabasePasswordsRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use RotateDistributedAutonomousDatabasePasswordsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedAutonomousDatabasePasswordsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + rotateDistributedAutonomousDatabasePasswordsDetails; + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + getRotateDistributedAutonomousDatabasePasswordsDetails() { + return rotateDistributedAutonomousDatabasePasswordsDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + getBody$() { + return rotateDistributedAutonomousDatabasePasswordsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RotateDistributedAutonomousDatabasePasswordsRequest, + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + rotateDistributedAutonomousDatabasePasswordsDetails = null; + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed autonomous database. + * @param rotateDistributedAutonomousDatabasePasswordsDetails the value to set + * @return this builder instance + */ + public Builder rotateDistributedAutonomousDatabasePasswordsDetails( + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + rotateDistributedAutonomousDatabasePasswordsDetails) { + this.rotateDistributedAutonomousDatabasePasswordsDetails = + rotateDistributedAutonomousDatabasePasswordsDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(RotateDistributedAutonomousDatabasePasswordsRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + rotateDistributedAutonomousDatabasePasswordsDetails( + o.getRotateDistributedAutonomousDatabasePasswordsDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RotateDistributedAutonomousDatabasePasswordsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RotateDistributedAutonomousDatabasePasswordsRequest + */ + public RotateDistributedAutonomousDatabasePasswordsRequest build() { + RotateDistributedAutonomousDatabasePasswordsRequest 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.distributeddatabasev26.model + .RotateDistributedAutonomousDatabasePasswordsDetails + body) { + rotateDistributedAutonomousDatabasePasswordsDetails(body); + return this; + } + + /** + * Build the instance of RotateDistributedAutonomousDatabasePasswordsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RotateDistributedAutonomousDatabasePasswordsRequest + */ + public RotateDistributedAutonomousDatabasePasswordsRequest + buildWithoutInvocationCallback() { + RotateDistributedAutonomousDatabasePasswordsRequest request = + new RotateDistributedAutonomousDatabasePasswordsRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.rotateDistributedAutonomousDatabasePasswordsDetails = + rotateDistributedAutonomousDatabasePasswordsDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new RotateDistributedAutonomousDatabasePasswordsRequest(distributedAutonomousDatabaseId, rotateDistributedAutonomousDatabasePasswordsDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .rotateDistributedAutonomousDatabasePasswordsDetails( + rotateDistributedAutonomousDatabasePasswordsDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",rotateDistributedAutonomousDatabasePasswordsDetails=") + .append(String.valueOf(this.rotateDistributedAutonomousDatabasePasswordsDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedAutonomousDatabasePasswordsRequest)) { + return false; + } + + RotateDistributedAutonomousDatabasePasswordsRequest other = + (RotateDistributedAutonomousDatabasePasswordsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.rotateDistributedAutonomousDatabasePasswordsDetails, + other.rotateDistributedAutonomousDatabasePasswordsDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.rotateDistributedAutonomousDatabasePasswordsDetails == null + ? 43 + : this.rotateDistributedAutonomousDatabasePasswordsDetails + .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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedDatabasePasswordsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedDatabasePasswordsRequest.java new file mode 100644 index 0000000000..5e7c72f311 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/RotateDistributedDatabasePasswordsRequest.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use RotateDistributedDatabasePasswordsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedDatabasePasswordsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedDatabasePasswordsDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.RotateDistributedDatabasePasswordsDetails + rotateDistributedDatabasePasswordsDetails; + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model.RotateDistributedDatabasePasswordsDetails + getRotateDistributedDatabasePasswordsDetails() { + return rotateDistributedDatabasePasswordsDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.RotateDistributedDatabasePasswordsDetails + getBody$() { + return rotateDistributedDatabasePasswordsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RotateDistributedDatabasePasswordsRequest, + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedDatabasePasswordsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedDatabasePasswordsDetails + rotateDistributedDatabasePasswordsDetails = null; + + /** + * Details to rotate passwords for shards and catalogs in the Globally distributed database. + * @param rotateDistributedDatabasePasswordsDetails the value to set + * @return this builder instance + */ + public Builder rotateDistributedDatabasePasswordsDetails( + com.oracle.bmc.distributeddatabasev26.model + .RotateDistributedDatabasePasswordsDetails + rotateDistributedDatabasePasswordsDetails) { + this.rotateDistributedDatabasePasswordsDetails = + rotateDistributedDatabasePasswordsDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(RotateDistributedDatabasePasswordsRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + rotateDistributedDatabasePasswordsDetails( + o.getRotateDistributedDatabasePasswordsDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RotateDistributedDatabasePasswordsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RotateDistributedDatabasePasswordsRequest + */ + public RotateDistributedDatabasePasswordsRequest build() { + RotateDistributedDatabasePasswordsRequest 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.distributeddatabasev26.model + .RotateDistributedDatabasePasswordsDetails + body) { + rotateDistributedDatabasePasswordsDetails(body); + return this; + } + + /** + * Build the instance of RotateDistributedDatabasePasswordsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RotateDistributedDatabasePasswordsRequest + */ + public RotateDistributedDatabasePasswordsRequest buildWithoutInvocationCallback() { + RotateDistributedDatabasePasswordsRequest request = + new RotateDistributedDatabasePasswordsRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.rotateDistributedDatabasePasswordsDetails = + rotateDistributedDatabasePasswordsDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new RotateDistributedDatabasePasswordsRequest(distributedDatabaseId, rotateDistributedDatabasePasswordsDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .rotateDistributedDatabasePasswordsDetails( + rotateDistributedDatabasePasswordsDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",rotateDistributedDatabasePasswordsDetails=") + .append(String.valueOf(this.rotateDistributedDatabasePasswordsDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateDistributedDatabasePasswordsRequest)) { + return false; + } + + RotateDistributedDatabasePasswordsRequest other = + (RotateDistributedDatabasePasswordsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.rotateDistributedDatabasePasswordsDetails, + other.rotateDistributedDatabasePasswordsDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.rotateDistributedDatabasePasswordsDetails == null + ? 43 + : this.rotateDistributedDatabasePasswordsDetails.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedAutonomousDatabaseGsmsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedAutonomousDatabaseGsmsRequest.java new file mode 100644 index 0000000000..7b5b023e38 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedAutonomousDatabaseGsmsRequest.java @@ -0,0 +1,391 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ScaleDistributedAutonomousDatabaseGsmsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedAutonomousDatabaseGsmsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails> { + + /** + * Empty payload to scale GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails + scaleDistributedAutonomousDatabaseGsmsDetails; + + /** + * Empty payload to scale GSM instances for the distributed autonomous database. + */ + public com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedAutonomousDatabaseGsmsDetails + getScaleDistributedAutonomousDatabaseGsmsDetails() { + return scaleDistributedAutonomousDatabaseGsmsDetails; + } + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedAutonomousDatabaseGsmsDetails + getBody$() { + return scaleDistributedAutonomousDatabaseGsmsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ScaleDistributedAutonomousDatabaseGsmsRequest, + com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Empty payload to scale GSM instances for the distributed autonomous database. + */ + private com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails + scaleDistributedAutonomousDatabaseGsmsDetails = null; + + /** + * Empty payload to scale GSM instances for the distributed autonomous database. + * @param scaleDistributedAutonomousDatabaseGsmsDetails the value to set + * @return this builder instance + */ + public Builder scaleDistributedAutonomousDatabaseGsmsDetails( + com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails + scaleDistributedAutonomousDatabaseGsmsDetails) { + this.scaleDistributedAutonomousDatabaseGsmsDetails = + scaleDistributedAutonomousDatabaseGsmsDetails; + return this; + } + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ScaleDistributedAutonomousDatabaseGsmsRequest o) { + scaleDistributedAutonomousDatabaseGsmsDetails( + o.getScaleDistributedAutonomousDatabaseGsmsDetails()); + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ScaleDistributedAutonomousDatabaseGsmsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ScaleDistributedAutonomousDatabaseGsmsRequest + */ + public ScaleDistributedAutonomousDatabaseGsmsRequest build() { + ScaleDistributedAutonomousDatabaseGsmsRequest 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.distributeddatabasev26.model + .ScaleDistributedAutonomousDatabaseGsmsDetails + body) { + scaleDistributedAutonomousDatabaseGsmsDetails(body); + return this; + } + + /** + * Build the instance of ScaleDistributedAutonomousDatabaseGsmsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ScaleDistributedAutonomousDatabaseGsmsRequest + */ + public ScaleDistributedAutonomousDatabaseGsmsRequest buildWithoutInvocationCallback() { + ScaleDistributedAutonomousDatabaseGsmsRequest request = + new ScaleDistributedAutonomousDatabaseGsmsRequest(); + request.scaleDistributedAutonomousDatabaseGsmsDetails = + scaleDistributedAutonomousDatabaseGsmsDetails; + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ScaleDistributedAutonomousDatabaseGsmsRequest(scaleDistributedAutonomousDatabaseGsmsDetails, distributedAutonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .scaleDistributedAutonomousDatabaseGsmsDetails( + scaleDistributedAutonomousDatabaseGsmsDetails) + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",scaleDistributedAutonomousDatabaseGsmsDetails=") + .append(String.valueOf(this.scaleDistributedAutonomousDatabaseGsmsDetails)); + sb.append(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScaleDistributedAutonomousDatabaseGsmsRequest)) { + return false; + } + + ScaleDistributedAutonomousDatabaseGsmsRequest other = + (ScaleDistributedAutonomousDatabaseGsmsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.scaleDistributedAutonomousDatabaseGsmsDetails, + other.scaleDistributedAutonomousDatabaseGsmsDetails) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.scaleDistributedAutonomousDatabaseGsmsDetails == null + ? 43 + : this.scaleDistributedAutonomousDatabaseGsmsDetails.hashCode()); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedDatabaseGsmsRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedDatabaseGsmsRequest.java new file mode 100644 index 0000000000..7bb4aa6e74 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ScaleDistributedDatabaseGsmsRequest.java @@ -0,0 +1,377 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ScaleDistributedDatabaseGsmsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedDatabaseGsmsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails> { + + /** + * Empty payload to scale GSM instances for the distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + scaleDistributedDatabaseGsmsDetails; + + /** + * Empty payload to scale GSM instances for the distributed database. + */ + public com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + getScaleDistributedDatabaseGsmsDetails() { + return scaleDistributedDatabaseGsmsDetails; + } + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + getBody$() { + return scaleDistributedDatabaseGsmsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ScaleDistributedDatabaseGsmsRequest, + com.oracle.bmc.distributeddatabasev26.model + .ScaleDistributedDatabaseGsmsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Empty payload to scale GSM instances for the distributed database. + */ + private com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + scaleDistributedDatabaseGsmsDetails = null; + + /** + * Empty payload to scale GSM instances for the distributed database. + * @param scaleDistributedDatabaseGsmsDetails the value to set + * @return this builder instance + */ + public Builder scaleDistributedDatabaseGsmsDetails( + com.oracle.bmc.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + scaleDistributedDatabaseGsmsDetails) { + this.scaleDistributedDatabaseGsmsDetails = scaleDistributedDatabaseGsmsDetails; + return this; + } + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ScaleDistributedDatabaseGsmsRequest o) { + scaleDistributedDatabaseGsmsDetails(o.getScaleDistributedDatabaseGsmsDetails()); + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ScaleDistributedDatabaseGsmsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ScaleDistributedDatabaseGsmsRequest + */ + public ScaleDistributedDatabaseGsmsRequest build() { + ScaleDistributedDatabaseGsmsRequest 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.distributeddatabasev26.model.ScaleDistributedDatabaseGsmsDetails + body) { + scaleDistributedDatabaseGsmsDetails(body); + return this; + } + + /** + * Build the instance of ScaleDistributedDatabaseGsmsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ScaleDistributedDatabaseGsmsRequest + */ + public ScaleDistributedDatabaseGsmsRequest buildWithoutInvocationCallback() { + ScaleDistributedDatabaseGsmsRequest request = new ScaleDistributedDatabaseGsmsRequest(); + request.scaleDistributedDatabaseGsmsDetails = scaleDistributedDatabaseGsmsDetails; + request.distributedDatabaseId = distributedDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ScaleDistributedDatabaseGsmsRequest(scaleDistributedDatabaseGsmsDetails, distributedDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .scaleDistributedDatabaseGsmsDetails(scaleDistributedDatabaseGsmsDetails) + .distributedDatabaseId(distributedDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",scaleDistributedDatabaseGsmsDetails=") + .append(String.valueOf(this.scaleDistributedDatabaseGsmsDetails)); + sb.append(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScaleDistributedDatabaseGsmsRequest)) { + return false; + } + + ScaleDistributedDatabaseGsmsRequest other = (ScaleDistributedDatabaseGsmsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.scaleDistributedDatabaseGsmsDetails, + other.scaleDistributedDatabaseGsmsDetails) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.scaleDistributedDatabaseGsmsDetails == null + ? 43 + : this.scaleDistributedDatabaseGsmsDetails.hashCode()); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..992954ad5f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use StartDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StartDistributedAutonomousDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(StartDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StartDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StartDistributedAutonomousDatabaseRequest + */ + public StartDistributedAutonomousDatabaseRequest build() { + StartDistributedAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StartDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StartDistributedAutonomousDatabaseRequest + */ + public StartDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + StartDistributedAutonomousDatabaseRequest request = + new StartDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new StartDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StartDistributedAutonomousDatabaseRequest)) { + return false; + } + + StartDistributedAutonomousDatabaseRequest other = + (StartDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedDatabaseRequest.java new file mode 100644 index 0000000000..c4c4554af4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StartDistributedDatabaseRequest.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use StartDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StartDistributedDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(StartDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StartDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StartDistributedDatabaseRequest + */ + public StartDistributedDatabaseRequest build() { + StartDistributedDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StartDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StartDistributedDatabaseRequest + */ + public StartDistributedDatabaseRequest buildWithoutInvocationCallback() { + StartDistributedDatabaseRequest request = new StartDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new StartDistributedDatabaseRequest(distributedDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StartDistributedDatabaseRequest)) { + return false; + } + + StartDistributedDatabaseRequest other = (StartDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..0dec316b63 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use StopDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StopDistributedAutonomousDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(StopDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StopDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StopDistributedAutonomousDatabaseRequest + */ + public StopDistributedAutonomousDatabaseRequest build() { + StopDistributedAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StopDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StopDistributedAutonomousDatabaseRequest + */ + public StopDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + StopDistributedAutonomousDatabaseRequest request = + new StopDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new StopDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopDistributedAutonomousDatabaseRequest)) { + return false; + } + + StopDistributedAutonomousDatabaseRequest other = + (StopDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedDatabaseRequest.java new file mode 100644 index 0000000000..8f2c9b141f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/StopDistributedDatabaseRequest.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use StopDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StopDistributedDatabaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(StopDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StopDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StopDistributedDatabaseRequest + */ + public StopDistributedDatabaseRequest build() { + StopDistributedDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StopDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StopDistributedDatabaseRequest + */ + public StopDistributedDatabaseRequest buildWithoutInvocationCallback() { + StopDistributedDatabaseRequest request = new StopDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new StopDistributedDatabaseRequest(distributedDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopDistributedDatabaseRequest)) { + return false; + } + + StopDistributedDatabaseRequest other = (StopDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedAutonomousDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedAutonomousDatabaseRequest.java new file mode 100644 index 0000000000..75f15ea9f0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedAutonomousDatabaseRequest.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use UpdateDistributedAutonomousDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedAutonomousDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedAutonomousDatabaseDetails> { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * The configuration of the Globally distributed autonomous database to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedAutonomousDatabaseDetails + updateDistributedAutonomousDatabaseDetails; + + /** + * The configuration of the Globally distributed autonomous database to be updated. + */ + public com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedAutonomousDatabaseDetails + getUpdateDistributedAutonomousDatabaseDetails() { + return updateDistributedAutonomousDatabaseDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedAutonomousDatabaseDetails + getBody$() { + return updateDistributedAutonomousDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDistributedAutonomousDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedAutonomousDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * The configuration of the Globally distributed autonomous database to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedAutonomousDatabaseDetails + updateDistributedAutonomousDatabaseDetails = null; + + /** + * The configuration of the Globally distributed autonomous database to be updated. + * @param updateDistributedAutonomousDatabaseDetails the value to set + * @return this builder instance + */ + public Builder updateDistributedAutonomousDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedAutonomousDatabaseDetails + updateDistributedAutonomousDatabaseDetails) { + this.updateDistributedAutonomousDatabaseDetails = + updateDistributedAutonomousDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(UpdateDistributedAutonomousDatabaseRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + updateDistributedAutonomousDatabaseDetails( + o.getUpdateDistributedAutonomousDatabaseDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDistributedAutonomousDatabaseRequest + */ + public UpdateDistributedAutonomousDatabaseRequest build() { + UpdateDistributedAutonomousDatabaseRequest 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.distributeddatabasev26.model + .UpdateDistributedAutonomousDatabaseDetails + body) { + updateDistributedAutonomousDatabaseDetails(body); + return this; + } + + /** + * Build the instance of UpdateDistributedAutonomousDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDistributedAutonomousDatabaseRequest + */ + public UpdateDistributedAutonomousDatabaseRequest buildWithoutInvocationCallback() { + UpdateDistributedAutonomousDatabaseRequest request = + new UpdateDistributedAutonomousDatabaseRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.updateDistributedAutonomousDatabaseDetails = + updateDistributedAutonomousDatabaseDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new UpdateDistributedAutonomousDatabaseRequest(distributedAutonomousDatabaseId, updateDistributedAutonomousDatabaseDetails, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .updateDistributedAutonomousDatabaseDetails( + updateDistributedAutonomousDatabaseDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",updateDistributedAutonomousDatabaseDetails=") + .append(String.valueOf(this.updateDistributedAutonomousDatabaseDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedAutonomousDatabaseRequest)) { + return false; + } + + UpdateDistributedAutonomousDatabaseRequest other = + (UpdateDistributedAutonomousDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals( + this.updateDistributedAutonomousDatabaseDetails, + other.updateDistributedAutonomousDatabaseDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.updateDistributedAutonomousDatabaseDetails == null + ? 43 + : this.updateDistributedAutonomousDatabaseDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabasePrivateEndpointRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabasePrivateEndpointRequest.java new file mode 100644 index 0000000000..bbf600b8e1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabasePrivateEndpointRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use UpdateDistributedDatabasePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabasePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails> { + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId; + + /** + * Distributed Database PrivateEndpoint identifier + */ + public String getDistributedDatabasePrivateEndpointId() { + return distributedDatabasePrivateEndpointId; + } + /** + * The configuration of private endpoint to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + updateDistributedDatabasePrivateEndpointDetails; + + /** + * The configuration of private endpoint to be updated. + */ + public com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + getUpdateDistributedDatabasePrivateEndpointDetails() { + return updateDistributedDatabasePrivateEndpointDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + getBody$() { + return updateDistributedDatabasePrivateEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDistributedDatabasePrivateEndpointRequest, + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Distributed Database PrivateEndpoint identifier + */ + private String distributedDatabasePrivateEndpointId = null; + + /** + * Distributed Database PrivateEndpoint identifier + * @param distributedDatabasePrivateEndpointId the value to set + * @return this builder instance + */ + public Builder distributedDatabasePrivateEndpointId( + String distributedDatabasePrivateEndpointId) { + this.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + return this; + } + + /** + * The configuration of private endpoint to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + updateDistributedDatabasePrivateEndpointDetails = null; + + /** + * The configuration of private endpoint to be updated. + * @param updateDistributedDatabasePrivateEndpointDetails the value to set + * @return this builder instance + */ + public Builder updateDistributedDatabasePrivateEndpointDetails( + com.oracle.bmc.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + updateDistributedDatabasePrivateEndpointDetails) { + this.updateDistributedDatabasePrivateEndpointDetails = + updateDistributedDatabasePrivateEndpointDetails; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(UpdateDistributedDatabasePrivateEndpointRequest o) { + distributedDatabasePrivateEndpointId(o.getDistributedDatabasePrivateEndpointId()); + updateDistributedDatabasePrivateEndpointDetails( + o.getUpdateDistributedDatabasePrivateEndpointDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDistributedDatabasePrivateEndpointRequest + */ + public UpdateDistributedDatabasePrivateEndpointRequest build() { + UpdateDistributedDatabasePrivateEndpointRequest 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.distributeddatabasev26.model + .UpdateDistributedDatabasePrivateEndpointDetails + body) { + updateDistributedDatabasePrivateEndpointDetails(body); + return this; + } + + /** + * Build the instance of UpdateDistributedDatabasePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDistributedDatabasePrivateEndpointRequest + */ + public UpdateDistributedDatabasePrivateEndpointRequest buildWithoutInvocationCallback() { + UpdateDistributedDatabasePrivateEndpointRequest request = + new UpdateDistributedDatabasePrivateEndpointRequest(); + request.distributedDatabasePrivateEndpointId = distributedDatabasePrivateEndpointId; + request.updateDistributedDatabasePrivateEndpointDetails = + updateDistributedDatabasePrivateEndpointDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new UpdateDistributedDatabasePrivateEndpointRequest(distributedDatabasePrivateEndpointId, updateDistributedDatabasePrivateEndpointDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabasePrivateEndpointId(distributedDatabasePrivateEndpointId) + .updateDistributedDatabasePrivateEndpointDetails( + updateDistributedDatabasePrivateEndpointDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabasePrivateEndpointId=") + .append(String.valueOf(this.distributedDatabasePrivateEndpointId)); + sb.append(",updateDistributedDatabasePrivateEndpointDetails=") + .append(String.valueOf(this.updateDistributedDatabasePrivateEndpointDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedDatabasePrivateEndpointRequest)) { + return false; + } + + UpdateDistributedDatabasePrivateEndpointRequest other = + (UpdateDistributedDatabasePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpointId, + other.distributedDatabasePrivateEndpointId) + && java.util.Objects.equals( + this.updateDistributedDatabasePrivateEndpointDetails, + other.updateDistributedDatabasePrivateEndpointDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpointId == null + ? 43 + : this.distributedDatabasePrivateEndpointId.hashCode()); + result = + (result * PRIME) + + (this.updateDistributedDatabasePrivateEndpointDetails == null + ? 43 + : this.updateDistributedDatabasePrivateEndpointDetails.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.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabaseRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabaseRequest.java new file mode 100644 index 0000000000..fc7f6e2a58 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/UpdateDistributedDatabaseRequest.java @@ -0,0 +1,320 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use UpdateDistributedDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails> { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * The configuration of the Globally distributed database to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails + updateDistributedDatabaseDetails; + + /** + * The configuration of the Globally distributed database to be updated. + */ + public com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails + getUpdateDistributedDatabaseDetails() { + return updateDistributedDatabaseDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails getBody$() { + return updateDistributedDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDistributedDatabaseRequest, + com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * The configuration of the Globally distributed database to be updated. + */ + private com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails + updateDistributedDatabaseDetails = null; + + /** + * The configuration of the Globally distributed database to be updated. + * @param updateDistributedDatabaseDetails the value to set + * @return this builder instance + */ + public Builder updateDistributedDatabaseDetails( + com.oracle.bmc.distributeddatabasev26.model.UpdateDistributedDatabaseDetails + updateDistributedDatabaseDetails) { + this.updateDistributedDatabaseDetails = updateDistributedDatabaseDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(UpdateDistributedDatabaseRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + updateDistributedDatabaseDetails(o.getUpdateDistributedDatabaseDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDistributedDatabaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDistributedDatabaseRequest + */ + public UpdateDistributedDatabaseRequest build() { + UpdateDistributedDatabaseRequest 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.distributeddatabasev26.model.UpdateDistributedDatabaseDetails body) { + updateDistributedDatabaseDetails(body); + return this; + } + + /** + * Build the instance of UpdateDistributedDatabaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDistributedDatabaseRequest + */ + public UpdateDistributedDatabaseRequest buildWithoutInvocationCallback() { + UpdateDistributedDatabaseRequest request = new UpdateDistributedDatabaseRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.updateDistributedDatabaseDetails = updateDistributedDatabaseDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new UpdateDistributedDatabaseRequest(distributedDatabaseId, updateDistributedDatabaseDetails, opcRequestId, ifMatch); + } + } + + /** + * 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() + .distributedDatabaseId(distributedDatabaseId) + .updateDistributedDatabaseDetails(updateDistributedDatabaseDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * 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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",updateDistributedDatabaseDetails=") + .append(String.valueOf(this.updateDistributedDatabaseDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedDatabaseRequest)) { + return false; + } + + UpdateDistributedDatabaseRequest other = (UpdateDistributedDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals( + this.updateDistributedDatabaseDetails, + other.updateDistributedDatabaseDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.updateDistributedDatabaseDetails == null + ? 43 + : this.updateDistributedDatabaseDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseCaBundleRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseCaBundleRequest.java new file mode 100644 index 0000000000..946597b3b0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseCaBundleRequest.java @@ -0,0 +1,312 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ValidateDistributedAutonomousDatabaseCaBundleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseCaBundleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ValidateDistributedAutonomousDatabaseCaBundleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ValidateDistributedAutonomousDatabaseCaBundleRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ValidateDistributedAutonomousDatabaseCaBundleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ValidateDistributedAutonomousDatabaseCaBundleRequest + */ + public ValidateDistributedAutonomousDatabaseCaBundleRequest build() { + ValidateDistributedAutonomousDatabaseCaBundleRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ValidateDistributedAutonomousDatabaseCaBundleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ValidateDistributedAutonomousDatabaseCaBundleRequest + */ + public ValidateDistributedAutonomousDatabaseCaBundleRequest + buildWithoutInvocationCallback() { + ValidateDistributedAutonomousDatabaseCaBundleRequest request = + new ValidateDistributedAutonomousDatabaseCaBundleRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ValidateDistributedAutonomousDatabaseCaBundleRequest(distributedAutonomousDatabaseId, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ValidateDistributedAutonomousDatabaseCaBundleRequest)) { + return false; + } + + ValidateDistributedAutonomousDatabaseCaBundleRequest other = + (ValidateDistributedAutonomousDatabaseCaBundleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseNetworkRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseNetworkRequest.java new file mode 100644 index 0000000000..45dca69c12 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedAutonomousDatabaseNetworkRequest.java @@ -0,0 +1,344 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ValidateDistributedAutonomousDatabaseNetworkRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseNetworkRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId; + + /** + * Globally distributed autonomous database identifier. + */ + public String getDistributedAutonomousDatabaseId() { + return distributedAutonomousDatabaseId; + } + /** + * Determines the surrogates check. Default is true. + */ + private Boolean isSurrogate; + + /** + * Determines the surrogates check. Default is true. + */ + public Boolean getIsSurrogate() { + return isSurrogate; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ValidateDistributedAutonomousDatabaseNetworkRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed autonomous database identifier. + */ + private String distributedAutonomousDatabaseId = null; + + /** + * Globally distributed autonomous database identifier. + * @param distributedAutonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedAutonomousDatabaseId(String distributedAutonomousDatabaseId) { + this.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + return this; + } + + /** + * Determines the surrogates check. Default is true. + */ + private Boolean isSurrogate = null; + + /** + * Determines the surrogates check. Default is true. + * @param isSurrogate the value to set + * @return this builder instance + */ + public Builder isSurrogate(Boolean isSurrogate) { + this.isSurrogate = isSurrogate; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ValidateDistributedAutonomousDatabaseNetworkRequest o) { + distributedAutonomousDatabaseId(o.getDistributedAutonomousDatabaseId()); + isSurrogate(o.getIsSurrogate()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ValidateDistributedAutonomousDatabaseNetworkRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ValidateDistributedAutonomousDatabaseNetworkRequest + */ + public ValidateDistributedAutonomousDatabaseNetworkRequest build() { + ValidateDistributedAutonomousDatabaseNetworkRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ValidateDistributedAutonomousDatabaseNetworkRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ValidateDistributedAutonomousDatabaseNetworkRequest + */ + public ValidateDistributedAutonomousDatabaseNetworkRequest + buildWithoutInvocationCallback() { + ValidateDistributedAutonomousDatabaseNetworkRequest request = + new ValidateDistributedAutonomousDatabaseNetworkRequest(); + request.distributedAutonomousDatabaseId = distributedAutonomousDatabaseId; + request.isSurrogate = isSurrogate; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ValidateDistributedAutonomousDatabaseNetworkRequest(distributedAutonomousDatabaseId, isSurrogate, ifMatch, 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() + .distributedAutonomousDatabaseId(distributedAutonomousDatabaseId) + .isSurrogate(isSurrogate) + .ifMatch(ifMatch) + .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(",distributedAutonomousDatabaseId=") + .append(String.valueOf(this.distributedAutonomousDatabaseId)); + sb.append(",isSurrogate=").append(String.valueOf(this.isSurrogate)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ValidateDistributedAutonomousDatabaseNetworkRequest)) { + return false; + } + + ValidateDistributedAutonomousDatabaseNetworkRequest other = + (ValidateDistributedAutonomousDatabaseNetworkRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseId, other.distributedAutonomousDatabaseId) + && java.util.Objects.equals(this.isSurrogate, other.isSurrogate) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedAutonomousDatabaseId == null + ? 43 + : this.distributedAutonomousDatabaseId.hashCode()); + result = (result * PRIME) + (this.isSurrogate == null ? 43 : this.isSurrogate.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedDatabaseNetworkRequest.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedDatabaseNetworkRequest.java new file mode 100644 index 0000000000..b5d28b5f9b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/requests/ValidateDistributedDatabaseNetworkRequest.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.requests; + +import com.oracle.bmc.distributeddatabasev26.model.*; +/** + * Example: Click here to see how to use ValidateDistributedDatabaseNetworkRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedDatabaseNetworkRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId; + + /** + * Globally distributed database identifier. + */ + public String getDistributedDatabaseId() { + return distributedDatabaseId; + } + /** + * Determines the surrogates check. Default is true. + */ + private Boolean isSurrogate; + + /** + * Determines the surrogates check. Default is true. + */ + public Boolean getIsSurrogate() { + return isSurrogate; + } + /** + * 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; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ValidateDistributedDatabaseNetworkRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Globally distributed database identifier. + */ + private String distributedDatabaseId = null; + + /** + * Globally distributed database identifier. + * @param distributedDatabaseId the value to set + * @return this builder instance + */ + public Builder distributedDatabaseId(String distributedDatabaseId) { + this.distributedDatabaseId = distributedDatabaseId; + return this; + } + + /** + * Determines the surrogates check. Default is true. + */ + private Boolean isSurrogate = null; + + /** + * Determines the surrogates check. Default is true. + * @param isSurrogate the value to set + * @return this builder instance + */ + public Builder isSurrogate(Boolean isSurrogate) { + this.isSurrogate = isSurrogate; + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(ValidateDistributedDatabaseNetworkRequest o) { + distributedDatabaseId(o.getDistributedDatabaseId()); + isSurrogate(o.getIsSurrogate()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ValidateDistributedDatabaseNetworkRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ValidateDistributedDatabaseNetworkRequest + */ + public ValidateDistributedDatabaseNetworkRequest build() { + ValidateDistributedDatabaseNetworkRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ValidateDistributedDatabaseNetworkRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ValidateDistributedDatabaseNetworkRequest + */ + public ValidateDistributedDatabaseNetworkRequest buildWithoutInvocationCallback() { + ValidateDistributedDatabaseNetworkRequest request = + new ValidateDistributedDatabaseNetworkRequest(); + request.distributedDatabaseId = distributedDatabaseId; + request.isSurrogate = isSurrogate; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ValidateDistributedDatabaseNetworkRequest(distributedDatabaseId, isSurrogate, ifMatch, 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() + .distributedDatabaseId(distributedDatabaseId) + .isSurrogate(isSurrogate) + .ifMatch(ifMatch) + .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(",distributedDatabaseId=").append(String.valueOf(this.distributedDatabaseId)); + sb.append(",isSurrogate=").append(String.valueOf(this.isSurrogate)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + 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 ValidateDistributedDatabaseNetworkRequest)) { + return false; + } + + ValidateDistributedDatabaseNetworkRequest other = + (ValidateDistributedDatabaseNetworkRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.distributedDatabaseId, other.distributedDatabaseId) + && java.util.Objects.equals(this.isSurrogate, other.isSurrogate) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && 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.distributedDatabaseId == null + ? 43 + : this.distributedDatabaseId.hashCode()); + result = (result * PRIME) + (this.isSurrogate == null ? 43 : this.isSurrogate.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedAutonomousDatabaseGdsControlNodeResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedAutonomousDatabaseGdsControlNodeResponse.java new file mode 100644 index 0000000000..f4620c8cc9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedAutonomousDatabaseGdsControlNodeResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedAutonomousDatabaseGdsControlNodeResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 AddDistributedAutonomousDatabaseGdsControlNodeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(AddDistributedAutonomousDatabaseGdsControlNodeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddDistributedAutonomousDatabaseGdsControlNodeResponse build() { + return new AddDistributedAutonomousDatabaseGdsControlNodeResponse( + __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 AddDistributedAutonomousDatabaseGdsControlNodeResponse)) { + return false; + } + + AddDistributedAutonomousDatabaseGdsControlNodeResponse other = + (AddDistributedAutonomousDatabaseGdsControlNodeResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedDatabaseGdsControlNodeResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedDatabaseGdsControlNodeResponse.java new file mode 100644 index 0000000000..d076fd2ab1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/AddDistributedDatabaseGdsControlNodeResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class AddDistributedDatabaseGdsControlNodeResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 AddDistributedDatabaseGdsControlNodeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(AddDistributedDatabaseGdsControlNodeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddDistributedDatabaseGdsControlNodeResponse build() { + return new AddDistributedDatabaseGdsControlNodeResponse( + __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 AddDistributedDatabaseGdsControlNodeResponse)) { + return false; + } + + AddDistributedDatabaseGdsControlNodeResponse other = + (AddDistributedDatabaseGdsControlNodeResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDatabaseCompartmentResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDatabaseCompartmentResponse.java new file mode 100644 index 0000000000..35f18346f7 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDatabaseCompartmentResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDatabaseCompartmentResponse + 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 work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ChangeDistributedAutonomousDatabaseCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ChangeDistributedAutonomousDatabaseCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDistributedAutonomousDatabaseCompartmentResponse build() { + return new ChangeDistributedAutonomousDatabaseCompartmentResponse( + __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 ChangeDistributedAutonomousDatabaseCompartmentResponse)) { + return false; + } + + ChangeDistributedAutonomousDatabaseCompartmentResponse other = + (ChangeDistributedAutonomousDatabaseCompartmentResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDbBackupConfigResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDbBackupConfigResponse.java new file mode 100644 index 0000000000..764e213162 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedAutonomousDbBackupConfigResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedAutonomousDbBackupConfigResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ChangeDistributedAutonomousDbBackupConfigResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ChangeDistributedAutonomousDbBackupConfigResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDistributedAutonomousDbBackupConfigResponse build() { + return new ChangeDistributedAutonomousDbBackupConfigResponse( + __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 ChangeDistributedAutonomousDbBackupConfigResponse)) { + return false; + } + + ChangeDistributedAutonomousDbBackupConfigResponse other = + (ChangeDistributedAutonomousDbBackupConfigResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabaseCompartmentResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabaseCompartmentResponse.java new file mode 100644 index 0000000000..6095d6860c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabaseCompartmentResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabaseCompartmentResponse + 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 work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ChangeDistributedDatabaseCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ChangeDistributedDatabaseCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDistributedDatabaseCompartmentResponse build() { + return new ChangeDistributedDatabaseCompartmentResponse( + __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 ChangeDistributedDatabaseCompartmentResponse)) { + return false; + } + + ChangeDistributedDatabaseCompartmentResponse other = + (ChangeDistributedDatabaseCompartmentResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabasePrivateEndpointCompartmentResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabasePrivateEndpointCompartmentResponse.java new file mode 100644 index 0000000000..070f2cf8f9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDatabasePrivateEndpointCompartmentResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDatabasePrivateEndpointCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ChangeDistributedDatabasePrivateEndpointCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ChangeDistributedDatabasePrivateEndpointCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDistributedDatabasePrivateEndpointCompartmentResponse build() { + return new ChangeDistributedDatabasePrivateEndpointCompartmentResponse( + __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 ChangeDistributedDatabasePrivateEndpointCompartmentResponse)) { + return false; + } + + ChangeDistributedDatabasePrivateEndpointCompartmentResponse other = + (ChangeDistributedDatabasePrivateEndpointCompartmentResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDbBackupConfigResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDbBackupConfigResponse.java new file mode 100644 index 0000000000..0af546f682 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ChangeDistributedDbBackupConfigResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ChangeDistributedDbBackupConfigResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ChangeDistributedDbBackupConfigResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ChangeDistributedDbBackupConfigResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDistributedDbBackupConfigResponse build() { + return new ChangeDistributedDbBackupConfigResponse( + __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 ChangeDistributedDbBackupConfigResponse)) { + return false; + } + + ChangeDistributedDbBackupConfigResponse other = (ChangeDistributedDbBackupConfigResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse.java new file mode 100644 index 0000000000..30c9b8ae28 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse + 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 DistributedAutonomousDatabaseAutoResourceManagementDetails instance. + */ + private com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + distributedAutonomousDatabaseAutoResourceManagementDetails; + + /** + * The returned DistributedAutonomousDatabaseAutoResourceManagementDetails instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + getDistributedAutonomousDatabaseAutoResourceManagementDetails() { + return distributedAutonomousDatabaseAutoResourceManagementDetails; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedAutonomousDatabaseAutoResourceManagementDetails" + }) + private ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + distributedAutonomousDatabaseAutoResourceManagementDetails) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedAutonomousDatabaseAutoResourceManagementDetails = + distributedAutonomousDatabaseAutoResourceManagementDetails; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedAutonomousDatabaseAutoResourceManagementDetails instance. + */ + private com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + distributedAutonomousDatabaseAutoResourceManagementDetails; + + /** + * The returned DistributedAutonomousDatabaseAutoResourceManagementDetails instance. + * @param distributedAutonomousDatabaseAutoResourceManagementDetails the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabaseAutoResourceManagementDetails( + com.oracle.bmc.distributeddatabasev26.model + .DistributedAutonomousDatabaseAutoResourceManagementDetails + distributedAutonomousDatabaseAutoResourceManagementDetails) { + this.distributedAutonomousDatabaseAutoResourceManagementDetails = + distributedAutonomousDatabaseAutoResourceManagementDetails; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy( + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedAutonomousDatabaseAutoResourceManagementDetails( + o.getDistributedAutonomousDatabaseAutoResourceManagementDetails()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse build() { + return new ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + distributedAutonomousDatabaseAutoResourceManagementDetails); + } + } + + /** + * 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(",distributedAutonomousDatabaseAutoResourceManagementDetails=") + .append(String.valueOf(distributedAutonomousDatabaseAutoResourceManagementDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse other = + (ConfigureDistributedAutonomousDatabaseAutoResourceManagementResponse) 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.distributedAutonomousDatabaseAutoResourceManagementDetails, + other.distributedAutonomousDatabaseAutoResourceManagementDetails); + } + + @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.distributedAutonomousDatabaseAutoResourceManagementDetails == null + ? 43 + : this.distributedAutonomousDatabaseAutoResourceManagementDetails + .hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmWalletResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmWalletResponse.java new file mode 100644 index 0000000000..40a86aff05 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmWalletResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmWalletResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ConfigureDistributedAutonomousDatabaseGsmWalletResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ConfigureDistributedAutonomousDatabaseGsmWalletResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedAutonomousDatabaseGsmWalletResponse build() { + return new ConfigureDistributedAutonomousDatabaseGsmWalletResponse( + __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 ConfigureDistributedAutonomousDatabaseGsmWalletResponse)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmWalletResponse other = + (ConfigureDistributedAutonomousDatabaseGsmWalletResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmsResponse.java new file mode 100644 index 0000000000..d7209808ee --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseGsmsResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseGsmsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ConfigureDistributedAutonomousDatabaseGsmsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ConfigureDistributedAutonomousDatabaseGsmsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedAutonomousDatabaseGsmsResponse build() { + return new ConfigureDistributedAutonomousDatabaseGsmsResponse( + __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 ConfigureDistributedAutonomousDatabaseGsmsResponse)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseGsmsResponse other = + (ConfigureDistributedAutonomousDatabaseGsmsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseShardingResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseShardingResponse.java new file mode 100644 index 0000000000..0e7ebdc21e --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedAutonomousDatabaseShardingResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedAutonomousDatabaseShardingResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ConfigureDistributedAutonomousDatabaseShardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ConfigureDistributedAutonomousDatabaseShardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedAutonomousDatabaseShardingResponse build() { + return new ConfigureDistributedAutonomousDatabaseShardingResponse( + __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 ConfigureDistributedAutonomousDatabaseShardingResponse)) { + return false; + } + + ConfigureDistributedAutonomousDatabaseShardingResponse other = + (ConfigureDistributedAutonomousDatabaseShardingResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseAutoResourceManagementResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseAutoResourceManagementResponse.java new file mode 100644 index 0000000000..82a41efbd0 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseAutoResourceManagementResponse.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseAutoResourceManagementResponse + 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 DistributedDatabaseAutoResourceManagementDetails instance. + */ + private com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + distributedDatabaseAutoResourceManagementDetails; + + /** + * The returned DistributedDatabaseAutoResourceManagementDetails instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + getDistributedDatabaseAutoResourceManagementDetails() { + return distributedDatabaseAutoResourceManagementDetails; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedDatabaseAutoResourceManagementDetails" + }) + private ConfigureDistributedDatabaseAutoResourceManagementResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + distributedDatabaseAutoResourceManagementDetails) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabaseAutoResourceManagementDetails = + distributedDatabaseAutoResourceManagementDetails; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedDatabaseAutoResourceManagementDetails instance. + */ + private com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + distributedDatabaseAutoResourceManagementDetails; + + /** + * The returned DistributedDatabaseAutoResourceManagementDetails instance. + * @param distributedDatabaseAutoResourceManagementDetails the value to set + * @return this builder + */ + public Builder distributedDatabaseAutoResourceManagementDetails( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabaseAutoResourceManagementDetails + distributedDatabaseAutoResourceManagementDetails) { + this.distributedDatabaseAutoResourceManagementDetails = + distributedDatabaseAutoResourceManagementDetails; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfigureDistributedDatabaseAutoResourceManagementResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabaseAutoResourceManagementDetails( + o.getDistributedDatabaseAutoResourceManagementDetails()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedDatabaseAutoResourceManagementResponse build() { + return new ConfigureDistributedDatabaseAutoResourceManagementResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + distributedDatabaseAutoResourceManagementDetails); + } + } + + /** + * 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(",distributedDatabaseAutoResourceManagementDetails=") + .append(String.valueOf(distributedDatabaseAutoResourceManagementDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureDistributedDatabaseAutoResourceManagementResponse)) { + return false; + } + + ConfigureDistributedDatabaseAutoResourceManagementResponse other = + (ConfigureDistributedDatabaseAutoResourceManagementResponse) 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.distributedDatabaseAutoResourceManagementDetails, + other.distributedDatabaseAutoResourceManagementDetails); + } + + @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.distributedDatabaseAutoResourceManagementDetails == null + ? 43 + : this.distributedDatabaseAutoResourceManagementDetails.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseGsmsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseGsmsResponse.java new file mode 100644 index 0000000000..c6e56926f4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseGsmsResponse.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseGsmsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ConfigureDistributedDatabaseGsmsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ConfigureDistributedDatabaseGsmsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedDatabaseGsmsResponse build() { + return new ConfigureDistributedDatabaseGsmsResponse( + __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 ConfigureDistributedDatabaseGsmsResponse)) { + return false; + } + + ConfigureDistributedDatabaseGsmsResponse other = + (ConfigureDistributedDatabaseGsmsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseShardingResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseShardingResponse.java new file mode 100644 index 0000000000..ec2d97dbc2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ConfigureDistributedDatabaseShardingResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ConfigureDistributedDatabaseShardingResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ConfigureDistributedDatabaseShardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ConfigureDistributedDatabaseShardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureDistributedDatabaseShardingResponse build() { + return new ConfigureDistributedDatabaseShardingResponse( + __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 ConfigureDistributedDatabaseShardingResponse)) { + return false; + } + + ConfigureDistributedDatabaseShardingResponse other = + (ConfigureDistributedDatabaseShardingResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..ef2e559a69 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedAutonomousDatabaseResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + getDistributedAutonomousDatabase() { + return distributedAutonomousDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "etag", + "distributedAutonomousDatabase" + }) + private CreateDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @param distributedAutonomousDatabase the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedAutonomousDatabase(o.getDistributedAutonomousDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDistributedAutonomousDatabaseResponse build() { + return new CreateDistributedAutonomousDatabaseResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + distributedAutonomousDatabase); + } + } + + /** + * 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(",etag=").append(String.valueOf(etag)); + sb.append(",distributedAutonomousDatabase=") + .append(String.valueOf(distributedAutonomousDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedAutonomousDatabaseResponse)) { + return false; + } + + CreateDistributedAutonomousDatabaseResponse other = + (CreateDistributedAutonomousDatabaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.distributedAutonomousDatabase, other.distributedAutonomousDatabase); + } + + @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()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.distributedAutonomousDatabase == null + ? 43 + : this.distributedAutonomousDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabasePrivateEndpointResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabasePrivateEndpointResponse.java new file mode 100644 index 0000000000..3e84284c47 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabasePrivateEndpointResponse.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabasePrivateEndpointResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + getDistributedDatabasePrivateEndpoint() { + return distributedDatabasePrivateEndpoint; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "etag", + "distributedDatabasePrivateEndpoint" + }) + private CreateDistributedDatabasePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @param distributedDatabasePrivateEndpoint the value to set + * @return this builder + */ + public Builder distributedDatabasePrivateEndpoint( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDistributedDatabasePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabasePrivateEndpoint(o.getDistributedDatabasePrivateEndpoint()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDistributedDatabasePrivateEndpointResponse build() { + return new CreateDistributedDatabasePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + distributedDatabasePrivateEndpoint); + } + } + + /** + * 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(",etag=").append(String.valueOf(etag)); + sb.append(",distributedDatabasePrivateEndpoint=") + .append(String.valueOf(distributedDatabasePrivateEndpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabasePrivateEndpointResponse)) { + return false; + } + + CreateDistributedDatabasePrivateEndpointResponse other = + (CreateDistributedDatabasePrivateEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.distributedDatabasePrivateEndpoint, + other.distributedDatabasePrivateEndpoint); + } + + @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()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.distributedDatabasePrivateEndpoint == null + ? 43 + : this.distributedDatabasePrivateEndpoint.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabaseResponse.java new file mode 100644 index 0000000000..5b0220030d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/CreateDistributedDatabaseResponse.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class CreateDistributedDatabaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + getDistributedDatabase() { + return distributedDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "etag", + "distributedDatabase" + }) + private CreateDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabase = distributedDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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; + } + + /** + * 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @param distributedDatabase the value to set + * @return this builder + */ + public Builder distributedDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + distributedDatabase) { + this.distributedDatabase = distributedDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabase(o.getDistributedDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDistributedDatabaseResponse build() { + return new CreateDistributedDatabaseResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + distributedDatabase); + } + } + + /** + * 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(",etag=").append(String.valueOf(etag)); + sb.append(",distributedDatabase=").append(String.valueOf(distributedDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDistributedDatabaseResponse)) { + return false; + } + + CreateDistributedDatabaseResponse other = (CreateDistributedDatabaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.distributedDatabase, other.distributedDatabase); + } + + @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()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.distributedDatabase == null + ? 43 + : this.distributedDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..4d111efdf9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedAutonomousDatabaseResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 DeleteDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(DeleteDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDistributedAutonomousDatabaseResponse build() { + return new DeleteDistributedAutonomousDatabaseResponse( + __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 DeleteDistributedAutonomousDatabaseResponse)) { + return false; + } + + DeleteDistributedAutonomousDatabaseResponse other = + (DeleteDistributedAutonomousDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabasePrivateEndpointResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabasePrivateEndpointResponse.java new file mode 100644 index 0000000000..02b8d183ce --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabasePrivateEndpointResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabasePrivateEndpointResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 DeleteDistributedDatabasePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(DeleteDistributedDatabasePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDistributedDatabasePrivateEndpointResponse build() { + return new DeleteDistributedDatabasePrivateEndpointResponse( + __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 DeleteDistributedDatabasePrivateEndpointResponse)) { + return false; + } + + DeleteDistributedDatabasePrivateEndpointResponse other = + (DeleteDistributedDatabasePrivateEndpointResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabaseResponse.java new file mode 100644 index 0000000000..cbe532bd34 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/DeleteDistributedDatabaseResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class DeleteDistributedDatabaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 DeleteDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(DeleteDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDistributedDatabaseResponse build() { + return new DeleteDistributedDatabaseResponse( + __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 DeleteDistributedDatabaseResponse)) { + return false; + } + + DeleteDistributedDatabaseResponse other = (DeleteDistributedDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedAutonomousDatabaseWalletResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedAutonomousDatabaseWalletResponse.java new file mode 100644 index 0000000000..18fc88ac0a --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedAutonomousDatabaseWalletResponse.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedAutonomousDatabaseWalletResponse + 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; + } + + /** + * Size of the file. + */ + private Long contentLength; + + /** + * Size of the file. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The date and time the wallet was created. + */ + private java.util.Date lastModified; + + /** + * The date and time the wallet was created. + * @return the value + */ + public java.util.Date getLastModified() { + return lastModified; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "contentLength", + "lastModified", + "inputStream" + }) + private GenerateDistributedAutonomousDatabaseWalletResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + Long contentLength, + java.util.Date lastModified, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.contentLength = contentLength; + this.lastModified = lastModified; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * Size of the file. + */ + private Long contentLength; + + /** + * Size of the file. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The date and time the wallet was created. + */ + private java.util.Date lastModified; + + /** + * The date and time the wallet was created. + * @param lastModified the value to set + * @return this builder + */ + public Builder lastModified(java.util.Date lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateDistributedAutonomousDatabaseWalletResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + contentLength(o.getContentLength()); + lastModified(o.getLastModified()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GenerateDistributedAutonomousDatabaseWalletResponse build() { + return new GenerateDistributedAutonomousDatabaseWalletResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + contentLength, + lastModified, + inputStream); + } + } + + /** + * 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(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",lastModified=").append(String.valueOf(lastModified)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateDistributedAutonomousDatabaseWalletResponse)) { + return false; + } + + GenerateDistributedAutonomousDatabaseWalletResponse other = + (GenerateDistributedAutonomousDatabaseWalletResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.lastModified, other.lastModified) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @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.contentLength == null ? 43 : this.contentLength.hashCode()); + result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedDatabaseWalletResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedDatabaseWalletResponse.java new file mode 100644 index 0000000000..4e63cb76f9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GenerateDistributedDatabaseWalletResponse.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GenerateDistributedDatabaseWalletResponse + 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; + } + + /** + * Size of the file. + */ + private Long contentLength; + + /** + * Size of the file. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The date and time the wallet was created. + */ + private java.util.Date lastModified; + + /** + * The date and time the wallet was created. + * @return the value + */ + public java.util.Date getLastModified() { + return lastModified; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "contentLength", + "lastModified", + "inputStream" + }) + private GenerateDistributedDatabaseWalletResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + Long contentLength, + java.util.Date lastModified, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.contentLength = contentLength; + this.lastModified = lastModified; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * Size of the file. + */ + private Long contentLength; + + /** + * Size of the file. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The date and time the wallet was created. + */ + private java.util.Date lastModified; + + /** + * The date and time the wallet was created. + * @param lastModified the value to set + * @return this builder + */ + public Builder lastModified(java.util.Date lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateDistributedDatabaseWalletResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + contentLength(o.getContentLength()); + lastModified(o.getLastModified()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GenerateDistributedDatabaseWalletResponse build() { + return new GenerateDistributedDatabaseWalletResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + contentLength, + lastModified, + inputStream); + } + } + + /** + * 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(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",lastModified=").append(String.valueOf(lastModified)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateDistributedDatabaseWalletResponse)) { + return false; + } + + GenerateDistributedDatabaseWalletResponse other = + (GenerateDistributedDatabaseWalletResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.lastModified, other.lastModified) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @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.contentLength == null ? 43 : this.contentLength.hashCode()); + result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRaftMetricResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRaftMetricResponse.java new file mode 100644 index 0000000000..b722e50d36 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRaftMetricResponse.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRaftMetricResponse + 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 returned DistributedAutonomousDatabaseRaftMetric instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRaftMetric + distributedAutonomousDatabaseRaftMetric; + + /** + * The returned DistributedAutonomousDatabaseRaftMetric instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRaftMetric + getDistributedAutonomousDatabaseRaftMetric() { + return distributedAutonomousDatabaseRaftMetric; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "distributedAutonomousDatabaseRaftMetric" + }) + private GetDistributedAutonomousDatabaseRaftMetricResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRaftMetric + distributedAutonomousDatabaseRaftMetric) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.distributedAutonomousDatabaseRaftMetric = distributedAutonomousDatabaseRaftMetric; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned DistributedAutonomousDatabaseRaftMetric instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRaftMetric + distributedAutonomousDatabaseRaftMetric; + + /** + * The returned DistributedAutonomousDatabaseRaftMetric instance. + * @param distributedAutonomousDatabaseRaftMetric the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabaseRaftMetric( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRaftMetric + distributedAutonomousDatabaseRaftMetric) { + this.distributedAutonomousDatabaseRaftMetric = distributedAutonomousDatabaseRaftMetric; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedAutonomousDatabaseRaftMetricResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + distributedAutonomousDatabaseRaftMetric(o.getDistributedAutonomousDatabaseRaftMetric()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedAutonomousDatabaseRaftMetricResponse build() { + return new GetDistributedAutonomousDatabaseRaftMetricResponse( + __httpStatusCode__, + headers, + opcRequestId, + distributedAutonomousDatabaseRaftMetric); + } + } + + /** + * 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(",distributedAutonomousDatabaseRaftMetric=") + .append(String.valueOf(distributedAutonomousDatabaseRaftMetric)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedAutonomousDatabaseRaftMetricResponse)) { + return false; + } + + GetDistributedAutonomousDatabaseRaftMetricResponse other = + (GetDistributedAutonomousDatabaseRaftMetricResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseRaftMetric, + other.distributedAutonomousDatabaseRaftMetric); + } + + @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.distributedAutonomousDatabaseRaftMetric == null + ? 43 + : this.distributedAutonomousDatabaseRaftMetric.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..b0a9b4c2b4 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseResponse 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + getDistributedAutonomousDatabase() { + return distributedAutonomousDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedAutonomousDatabase" + }) + private GetDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @param distributedAutonomousDatabase the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedAutonomousDatabase(o.getDistributedAutonomousDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedAutonomousDatabaseResponse build() { + return new GetDistributedAutonomousDatabaseResponse( + __httpStatusCode__, headers, opcRequestId, etag, distributedAutonomousDatabase); + } + } + + /** + * 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(",distributedAutonomousDatabase=") + .append(String.valueOf(distributedAutonomousDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedAutonomousDatabaseResponse)) { + return false; + } + + GetDistributedAutonomousDatabaseResponse other = + (GetDistributedAutonomousDatabaseResponse) 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.distributedAutonomousDatabase, other.distributedAutonomousDatabase); + } + + @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.distributedAutonomousDatabase == null + ? 43 + : this.distributedAutonomousDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRuChangeLogResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRuChangeLogResponse.java new file mode 100644 index 0000000000..2a4d0c5d8b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedAutonomousDatabaseRuChangeLogResponse.java @@ -0,0 +1,191 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedAutonomousDatabaseRuChangeLogResponse + 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 returned DistributedAutonomousDatabaseRuChangeLog instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRuChangeLog + distributedAutonomousDatabaseRuChangeLog; + + /** + * The returned DistributedAutonomousDatabaseRuChangeLog instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRuChangeLog + getDistributedAutonomousDatabaseRuChangeLog() { + return distributedAutonomousDatabaseRuChangeLog; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "distributedAutonomousDatabaseRuChangeLog" + }) + private GetDistributedAutonomousDatabaseRuChangeLogResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRuChangeLog + distributedAutonomousDatabaseRuChangeLog) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.distributedAutonomousDatabaseRuChangeLog = distributedAutonomousDatabaseRuChangeLog; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned DistributedAutonomousDatabaseRuChangeLog instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRuChangeLog + distributedAutonomousDatabaseRuChangeLog; + + /** + * The returned DistributedAutonomousDatabaseRuChangeLog instance. + * @param distributedAutonomousDatabaseRuChangeLog the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabaseRuChangeLog( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseRuChangeLog + distributedAutonomousDatabaseRuChangeLog) { + this.distributedAutonomousDatabaseRuChangeLog = + distributedAutonomousDatabaseRuChangeLog; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedAutonomousDatabaseRuChangeLogResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + distributedAutonomousDatabaseRuChangeLog( + o.getDistributedAutonomousDatabaseRuChangeLog()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedAutonomousDatabaseRuChangeLogResponse build() { + return new GetDistributedAutonomousDatabaseRuChangeLogResponse( + __httpStatusCode__, + headers, + opcRequestId, + distributedAutonomousDatabaseRuChangeLog); + } + } + + /** + * 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(",distributedAutonomousDatabaseRuChangeLog=") + .append(String.valueOf(distributedAutonomousDatabaseRuChangeLog)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedAutonomousDatabaseRuChangeLogResponse)) { + return false; + } + + GetDistributedAutonomousDatabaseRuChangeLogResponse other = + (GetDistributedAutonomousDatabaseRuChangeLogResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.distributedAutonomousDatabaseRuChangeLog, + other.distributedAutonomousDatabaseRuChangeLog); + } + + @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.distributedAutonomousDatabaseRuChangeLog == null + ? 43 + : this.distributedAutonomousDatabaseRuChangeLog.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabasePrivateEndpointResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabasePrivateEndpointResponse.java new file mode 100644 index 0000000000..5459b3b7a1 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabasePrivateEndpointResponse.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabasePrivateEndpointResponse + 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + getDistributedDatabasePrivateEndpoint() { + return distributedDatabasePrivateEndpoint; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedDatabasePrivateEndpoint" + }) + private GetDistributedDatabasePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @param distributedDatabasePrivateEndpoint the value to set + * @return this builder + */ + public Builder distributedDatabasePrivateEndpoint( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedDatabasePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabasePrivateEndpoint(o.getDistributedDatabasePrivateEndpoint()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedDatabasePrivateEndpointResponse build() { + return new GetDistributedDatabasePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + distributedDatabasePrivateEndpoint); + } + } + + /** + * 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(",distributedDatabasePrivateEndpoint=") + .append(String.valueOf(distributedDatabasePrivateEndpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedDatabasePrivateEndpointResponse)) { + return false; + } + + GetDistributedDatabasePrivateEndpointResponse other = + (GetDistributedDatabasePrivateEndpointResponse) 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.distributedDatabasePrivateEndpoint, + other.distributedDatabasePrivateEndpoint); + } + + @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.distributedDatabasePrivateEndpoint == null + ? 43 + : this.distributedDatabasePrivateEndpoint.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRaftMetricResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRaftMetricResponse.java new file mode 100644 index 0000000000..f18f9dd174 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRaftMetricResponse.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRaftMetricResponse 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 returned DistributedDatabaseRaftMetric instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRaftMetric + distributedDatabaseRaftMetric; + + /** + * The returned DistributedDatabaseRaftMetric instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRaftMetric + getDistributedDatabaseRaftMetric() { + return distributedDatabaseRaftMetric; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "distributedDatabaseRaftMetric" + }) + private GetDistributedDatabaseRaftMetricResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRaftMetric + distributedDatabaseRaftMetric) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.distributedDatabaseRaftMetric = distributedDatabaseRaftMetric; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned DistributedDatabaseRaftMetric instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRaftMetric + distributedDatabaseRaftMetric; + + /** + * The returned DistributedDatabaseRaftMetric instance. + * @param distributedDatabaseRaftMetric the value to set + * @return this builder + */ + public Builder distributedDatabaseRaftMetric( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRaftMetric + distributedDatabaseRaftMetric) { + this.distributedDatabaseRaftMetric = distributedDatabaseRaftMetric; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedDatabaseRaftMetricResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + distributedDatabaseRaftMetric(o.getDistributedDatabaseRaftMetric()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedDatabaseRaftMetricResponse build() { + return new GetDistributedDatabaseRaftMetricResponse( + __httpStatusCode__, headers, opcRequestId, distributedDatabaseRaftMetric); + } + } + + /** + * 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(",distributedDatabaseRaftMetric=") + .append(String.valueOf(distributedDatabaseRaftMetric)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedDatabaseRaftMetricResponse)) { + return false; + } + + GetDistributedDatabaseRaftMetricResponse other = + (GetDistributedDatabaseRaftMetricResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.distributedDatabaseRaftMetric, other.distributedDatabaseRaftMetric); + } + + @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.distributedDatabaseRaftMetric == null + ? 43 + : this.distributedDatabaseRaftMetric.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseResponse.java new file mode 100644 index 0000000000..b62c60afca --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseResponse 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + getDistributedDatabase() { + return distributedDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedDatabase" + }) + private GetDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabase = distributedDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @param distributedDatabase the value to set + * @return this builder + */ + public Builder distributedDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + distributedDatabase) { + this.distributedDatabase = distributedDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabase(o.getDistributedDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedDatabaseResponse build() { + return new GetDistributedDatabaseResponse( + __httpStatusCode__, headers, opcRequestId, etag, distributedDatabase); + } + } + + /** + * 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(",distributedDatabase=").append(String.valueOf(distributedDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedDatabaseResponse)) { + return false; + } + + GetDistributedDatabaseResponse other = (GetDistributedDatabaseResponse) 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.distributedDatabase, other.distributedDatabase); + } + + @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.distributedDatabase == null + ? 43 + : this.distributedDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRuChangeLogResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRuChangeLogResponse.java new file mode 100644 index 0000000000..697ced6c04 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetDistributedDatabaseRuChangeLogResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetDistributedDatabaseRuChangeLogResponse + 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 returned DistributedDatabaseRuChangeLog instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRuChangeLog + distributedDatabaseRuChangeLog; + + /** + * The returned DistributedDatabaseRuChangeLog instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRuChangeLog + getDistributedDatabaseRuChangeLog() { + return distributedDatabaseRuChangeLog; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "distributedDatabaseRuChangeLog" + }) + private GetDistributedDatabaseRuChangeLogResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRuChangeLog + distributedDatabaseRuChangeLog) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.distributedDatabaseRuChangeLog = distributedDatabaseRuChangeLog; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned DistributedDatabaseRuChangeLog instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRuChangeLog + distributedDatabaseRuChangeLog; + + /** + * The returned DistributedDatabaseRuChangeLog instance. + * @param distributedDatabaseRuChangeLog the value to set + * @return this builder + */ + public Builder distributedDatabaseRuChangeLog( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseRuChangeLog + distributedDatabaseRuChangeLog) { + this.distributedDatabaseRuChangeLog = distributedDatabaseRuChangeLog; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDistributedDatabaseRuChangeLogResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + distributedDatabaseRuChangeLog(o.getDistributedDatabaseRuChangeLog()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDistributedDatabaseRuChangeLogResponse build() { + return new GetDistributedDatabaseRuChangeLogResponse( + __httpStatusCode__, headers, opcRequestId, distributedDatabaseRuChangeLog); + } + } + + /** + * 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(",distributedDatabaseRuChangeLog=") + .append(String.valueOf(distributedDatabaseRuChangeLog)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDistributedDatabaseRuChangeLogResponse)) { + return false; + } + + GetDistributedDatabaseRuChangeLogResponse other = + (GetDistributedDatabaseRuChangeLogResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.distributedDatabaseRuChangeLog, other.distributedDatabaseRuChangeLog); + } + + @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.distributedDatabaseRuChangeLog == null + ? 43 + : this.distributedDatabaseRuChangeLog.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetWorkRequestResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetWorkRequestResponse.java new file mode 100644 index 0000000000..de8e9ce55d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/GetWorkRequestResponse.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class GetWorkRequestResponse 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; + } + + /** + * 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 WorkRequest instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.distributeddatabasev26.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * 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 WorkRequest instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest( + com.oracle.bmc.distributeddatabasev26.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestResponse build() { + return new GetWorkRequestResponse( + __httpStatusCode__, headers, 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(",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 GetWorkRequestResponse)) { + return false; + } + + GetWorkRequestResponse other = (GetWorkRequestResponse) 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.workRequest, other.workRequest); + } + + @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.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedAutonomousDatabasesResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedAutonomousDatabasesResponse.java new file mode 100644 index 0000000000..9f67d4a47d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedAutonomousDatabasesResponse.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedAutonomousDatabasesResponse + 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; + } + + /** + * The returned DistributedAutonomousDatabaseCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseCollection + distributedAutonomousDatabaseCollection; + + /** + * The returned DistributedAutonomousDatabaseCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseCollection + getDistributedAutonomousDatabaseCollection() { + return distributedAutonomousDatabaseCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "distributedAutonomousDatabaseCollection" + }) + private ListDistributedAutonomousDatabasesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseCollection + distributedAutonomousDatabaseCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.distributedAutonomousDatabaseCollection = distributedAutonomousDatabaseCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned DistributedAutonomousDatabaseCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseCollection + distributedAutonomousDatabaseCollection; + + /** + * The returned DistributedAutonomousDatabaseCollection instance. + * @param distributedAutonomousDatabaseCollection the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabaseCollection( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabaseCollection + distributedAutonomousDatabaseCollection) { + this.distributedAutonomousDatabaseCollection = distributedAutonomousDatabaseCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDistributedAutonomousDatabasesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + distributedAutonomousDatabaseCollection(o.getDistributedAutonomousDatabaseCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDistributedAutonomousDatabasesResponse build() { + return new ListDistributedAutonomousDatabasesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + distributedAutonomousDatabaseCollection); + } + } + + /** + * 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(",distributedAutonomousDatabaseCollection=") + .append(String.valueOf(distributedAutonomousDatabaseCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDistributedAutonomousDatabasesResponse)) { + return false; + } + + ListDistributedAutonomousDatabasesResponse other = + (ListDistributedAutonomousDatabasesResponse) 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.distributedAutonomousDatabaseCollection, + other.distributedAutonomousDatabaseCollection); + } + + @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.distributedAutonomousDatabaseCollection == null + ? 43 + : this.distributedAutonomousDatabaseCollection.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasePrivateEndpointsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasePrivateEndpointsResponse.java new file mode 100644 index 0000000000..12103ddf24 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasePrivateEndpointsResponse.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasePrivateEndpointsResponse + 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; + } + + /** + * The returned DistributedDatabasePrivateEndpointCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpointCollection + distributedDatabasePrivateEndpointCollection; + + /** + * The returned DistributedDatabasePrivateEndpointCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpointCollection + getDistributedDatabasePrivateEndpointCollection() { + return distributedDatabasePrivateEndpointCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "distributedDatabasePrivateEndpointCollection" + }) + private ListDistributedDatabasePrivateEndpointsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpointCollection + distributedDatabasePrivateEndpointCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.distributedDatabasePrivateEndpointCollection = + distributedDatabasePrivateEndpointCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned DistributedDatabasePrivateEndpointCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection + distributedDatabasePrivateEndpointCollection; + + /** + * The returned DistributedDatabasePrivateEndpointCollection instance. + * @param distributedDatabasePrivateEndpointCollection the value to set + * @return this builder + */ + public Builder distributedDatabasePrivateEndpointCollection( + com.oracle.bmc.distributeddatabasev26.model + .DistributedDatabasePrivateEndpointCollection + distributedDatabasePrivateEndpointCollection) { + this.distributedDatabasePrivateEndpointCollection = + distributedDatabasePrivateEndpointCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDistributedDatabasePrivateEndpointsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + distributedDatabasePrivateEndpointCollection( + o.getDistributedDatabasePrivateEndpointCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDistributedDatabasePrivateEndpointsResponse build() { + return new ListDistributedDatabasePrivateEndpointsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + distributedDatabasePrivateEndpointCollection); + } + } + + /** + * 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(",distributedDatabasePrivateEndpointCollection=") + .append(String.valueOf(distributedDatabasePrivateEndpointCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDistributedDatabasePrivateEndpointsResponse)) { + return false; + } + + ListDistributedDatabasePrivateEndpointsResponse other = + (ListDistributedDatabasePrivateEndpointsResponse) 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.distributedDatabasePrivateEndpointCollection, + other.distributedDatabasePrivateEndpointCollection); + } + + @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.distributedDatabasePrivateEndpointCollection == null + ? 43 + : this.distributedDatabasePrivateEndpointCollection.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasesResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasesResponse.java new file mode 100644 index 0000000000..9996474782 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListDistributedDatabasesResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListDistributedDatabasesResponse 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; + } + + /** + * The returned DistributedDatabaseCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseCollection + distributedDatabaseCollection; + + /** + * The returned DistributedDatabaseCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseCollection + getDistributedDatabaseCollection() { + return distributedDatabaseCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "distributedDatabaseCollection" + }) + private ListDistributedDatabasesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseCollection + distributedDatabaseCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.distributedDatabaseCollection = distributedDatabaseCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned DistributedDatabaseCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseCollection + distributedDatabaseCollection; + + /** + * The returned DistributedDatabaseCollection instance. + * @param distributedDatabaseCollection the value to set + * @return this builder + */ + public Builder distributedDatabaseCollection( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabaseCollection + distributedDatabaseCollection) { + this.distributedDatabaseCollection = distributedDatabaseCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDistributedDatabasesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + distributedDatabaseCollection(o.getDistributedDatabaseCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDistributedDatabasesResponse build() { + return new ListDistributedDatabasesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + distributedDatabaseCollection); + } + } + + /** + * 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(",distributedDatabaseCollection=") + .append(String.valueOf(distributedDatabaseCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDistributedDatabasesResponse)) { + return false; + } + + ListDistributedDatabasesResponse other = (ListDistributedDatabasesResponse) 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.distributedDatabaseCollection, other.distributedDatabaseCollection); + } + + @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.distributedDatabaseCollection == null + ? 43 + : this.distributedDatabaseCollection.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestErrorsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 0000000000..76a0b58537 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * 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; + } + + /** + * 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 WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.WorkRequestErrorCollection + getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestErrorCollection + workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + 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; + } + + /** + * 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 WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.distributeddatabasev26.model.WorkRequestErrorCollection + workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse 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 + */ + public ListWorkRequestErrorsResponse build() { + return new ListWorkRequestErrorsResponse( + __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 ListWorkRequestErrorsResponse)) { + return false; + } + + ListWorkRequestErrorsResponse other = (ListWorkRequestErrorsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestLogsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 0000000000..ef3357d2fe --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * 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; + } + + /** + * 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 WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + 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; + } + + /** + * 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 WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.distributeddatabasev26.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse 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 + */ + public ListWorkRequestLogsResponse build() { + return new ListWorkRequestLogsResponse( + __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 ListWorkRequestLogsResponse)) { + return false; + } + + ListWorkRequestLogsResponse other = (ListWorkRequestLogsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestsResponse.java new file mode 100644 index 0000000000..d658a7f41d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ListWorkRequestsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ListWorkRequestsResponse 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; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummaryCollection + getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.distributeddatabasev26.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse 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 + */ + public ListWorkRequestsResponse build() { + return new ListWorkRequestsResponse( + __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 ListWorkRequestsResponse)) { + return false; + } + + ListWorkRequestsResponse other = (ListWorkRequestsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedAutonomousDatabaseReplicationUnitResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedAutonomousDatabaseReplicationUnitResponse.java new file mode 100644 index 0000000000..b93947aab2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedAutonomousDatabaseReplicationUnitResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedAutonomousDatabaseReplicationUnitResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 MoveDistributedAutonomousDatabaseReplicationUnitResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(MoveDistributedAutonomousDatabaseReplicationUnitResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MoveDistributedAutonomousDatabaseReplicationUnitResponse build() { + return new MoveDistributedAutonomousDatabaseReplicationUnitResponse( + __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 MoveDistributedAutonomousDatabaseReplicationUnitResponse)) { + return false; + } + + MoveDistributedAutonomousDatabaseReplicationUnitResponse other = + (MoveDistributedAutonomousDatabaseReplicationUnitResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedDatabaseReplicationUnitResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedDatabaseReplicationUnitResponse.java new file mode 100644 index 0000000000..086d851435 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/MoveDistributedDatabaseReplicationUnitResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class MoveDistributedDatabaseReplicationUnitResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 MoveDistributedDatabaseReplicationUnitResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(MoveDistributedDatabaseReplicationUnitResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MoveDistributedDatabaseReplicationUnitResponse build() { + return new MoveDistributedDatabaseReplicationUnitResponse( + __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 MoveDistributedDatabaseReplicationUnitResponse)) { + return false; + } + + MoveDistributedDatabaseReplicationUnitResponse other = + (MoveDistributedDatabaseReplicationUnitResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..6afd51d72d --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedAutonomousDatabaseResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 PatchDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(PatchDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchDistributedAutonomousDatabaseResponse build() { + return new PatchDistributedAutonomousDatabaseResponse( + __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 PatchDistributedAutonomousDatabaseResponse)) { + return false; + } + + PatchDistributedAutonomousDatabaseResponse other = + (PatchDistributedAutonomousDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabasePrivateEndpointResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabasePrivateEndpointResponse.java new file mode 100644 index 0000000000..af18dad0b8 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabasePrivateEndpointResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabasePrivateEndpointResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 PatchDistributedDatabasePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(PatchDistributedDatabasePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchDistributedDatabasePrivateEndpointResponse build() { + return new PatchDistributedDatabasePrivateEndpointResponse( + __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 PatchDistributedDatabasePrivateEndpointResponse)) { + return false; + } + + PatchDistributedDatabasePrivateEndpointResponse other = + (PatchDistributedDatabasePrivateEndpointResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabaseResponse.java new file mode 100644 index 0000000000..8916e5ff54 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/PatchDistributedDatabaseResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class PatchDistributedDatabaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 PatchDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(PatchDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchDistributedDatabaseResponse build() { + return new PatchDistributedDatabaseResponse( + __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 PatchDistributedDatabaseResponse)) { + return false; + } + + PatchDistributedDatabaseResponse other = (PatchDistributedDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedAutonomousDatabaseResourceResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedAutonomousDatabaseResourceResponse.java new file mode 100644 index 0000000000..3f7c0b5a4f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedAutonomousDatabaseResourceResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedAutonomousDatabaseResourceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 RecreateFailedDistributedAutonomousDatabaseResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(RecreateFailedDistributedAutonomousDatabaseResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RecreateFailedDistributedAutonomousDatabaseResourceResponse build() { + return new RecreateFailedDistributedAutonomousDatabaseResourceResponse( + __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 RecreateFailedDistributedAutonomousDatabaseResourceResponse)) { + return false; + } + + RecreateFailedDistributedAutonomousDatabaseResourceResponse other = + (RecreateFailedDistributedAutonomousDatabaseResourceResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedDatabaseResourceResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedDatabaseResourceResponse.java new file mode 100644 index 0000000000..4d278b8be3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RecreateFailedDistributedDatabaseResourceResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RecreateFailedDistributedDatabaseResourceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 RecreateFailedDistributedDatabaseResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(RecreateFailedDistributedDatabaseResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RecreateFailedDistributedDatabaseResourceResponse build() { + return new RecreateFailedDistributedDatabaseResourceResponse( + __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 RecreateFailedDistributedDatabaseResourceResponse)) { + return false; + } + + RecreateFailedDistributedDatabaseResourceResponse other = + (RecreateFailedDistributedDatabaseResourceResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ReinstateProxyInstanceResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ReinstateProxyInstanceResponse.java new file mode 100644 index 0000000000..7844e242b5 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ReinstateProxyInstanceResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ReinstateProxyInstanceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ReinstateProxyInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ReinstateProxyInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReinstateProxyInstanceResponse build() { + return new ReinstateProxyInstanceResponse( + __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 ReinstateProxyInstanceResponse)) { + return false; + } + + ReinstateProxyInstanceResponse other = (ReinstateProxyInstanceResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedAutonomousDatabasePasswordsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedAutonomousDatabasePasswordsResponse.java new file mode 100644 index 0000000000..c845e5f483 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedAutonomousDatabasePasswordsResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedAutonomousDatabasePasswordsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 RotateDistributedAutonomousDatabasePasswordsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(RotateDistributedAutonomousDatabasePasswordsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RotateDistributedAutonomousDatabasePasswordsResponse build() { + return new RotateDistributedAutonomousDatabasePasswordsResponse( + __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 RotateDistributedAutonomousDatabasePasswordsResponse)) { + return false; + } + + RotateDistributedAutonomousDatabasePasswordsResponse other = + (RotateDistributedAutonomousDatabasePasswordsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedDatabasePasswordsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedDatabasePasswordsResponse.java new file mode 100644 index 0000000000..3f24548fd9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/RotateDistributedDatabasePasswordsResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class RotateDistributedDatabasePasswordsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 RotateDistributedDatabasePasswordsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(RotateDistributedDatabasePasswordsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RotateDistributedDatabasePasswordsResponse build() { + return new RotateDistributedDatabasePasswordsResponse( + __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 RotateDistributedDatabasePasswordsResponse)) { + return false; + } + + RotateDistributedDatabasePasswordsResponse other = + (RotateDistributedDatabasePasswordsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedAutonomousDatabaseGsmsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedAutonomousDatabaseGsmsResponse.java new file mode 100644 index 0000000000..1759df874c --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedAutonomousDatabaseGsmsResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedAutonomousDatabaseGsmsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ScaleDistributedAutonomousDatabaseGsmsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ScaleDistributedAutonomousDatabaseGsmsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ScaleDistributedAutonomousDatabaseGsmsResponse build() { + return new ScaleDistributedAutonomousDatabaseGsmsResponse( + __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 ScaleDistributedAutonomousDatabaseGsmsResponse)) { + return false; + } + + ScaleDistributedAutonomousDatabaseGsmsResponse other = + (ScaleDistributedAutonomousDatabaseGsmsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedDatabaseGsmsResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedDatabaseGsmsResponse.java new file mode 100644 index 0000000000..c35d70008b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ScaleDistributedDatabaseGsmsResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ScaleDistributedDatabaseGsmsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ScaleDistributedDatabaseGsmsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ScaleDistributedDatabaseGsmsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ScaleDistributedDatabaseGsmsResponse build() { + return new ScaleDistributedDatabaseGsmsResponse( + __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 ScaleDistributedDatabaseGsmsResponse)) { + return false; + } + + ScaleDistributedDatabaseGsmsResponse other = (ScaleDistributedDatabaseGsmsResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..0300b10993 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedAutonomousDatabaseResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 StartDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(StartDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StartDistributedAutonomousDatabaseResponse build() { + return new StartDistributedAutonomousDatabaseResponse( + __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 StartDistributedAutonomousDatabaseResponse)) { + return false; + } + + StartDistributedAutonomousDatabaseResponse other = + (StartDistributedAutonomousDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedDatabaseResponse.java new file mode 100644 index 0000000000..dc8247b93f --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StartDistributedDatabaseResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StartDistributedDatabaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 StartDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(StartDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StartDistributedDatabaseResponse build() { + return new StartDistributedDatabaseResponse( + __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 StartDistributedDatabaseResponse)) { + return false; + } + + StartDistributedDatabaseResponse other = (StartDistributedDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..17c3056393 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedAutonomousDatabaseResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 StopDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(StopDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StopDistributedAutonomousDatabaseResponse build() { + return new StopDistributedAutonomousDatabaseResponse( + __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 StopDistributedAutonomousDatabaseResponse)) { + return false; + } + + StopDistributedAutonomousDatabaseResponse other = + (StopDistributedAutonomousDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedDatabaseResponse.java new file mode 100644 index 0000000000..db9738d621 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/StopDistributedDatabaseResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class StopDistributedDatabaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 StopDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(StopDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StopDistributedDatabaseResponse build() { + return new StopDistributedDatabaseResponse( + __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 StopDistributedDatabaseResponse)) { + return false; + } + + StopDistributedDatabaseResponse other = (StopDistributedDatabaseResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedAutonomousDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedAutonomousDatabaseResponse.java new file mode 100644 index 0000000000..142df570a9 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedAutonomousDatabaseResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedAutonomousDatabaseResponse + 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + getDistributedAutonomousDatabase() { + return distributedAutonomousDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedAutonomousDatabase" + }) + private UpdateDistributedAutonomousDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedAutonomousDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase; + + /** + * The returned DistributedAutonomousDatabase instance. + * @param distributedAutonomousDatabase the value to set + * @return this builder + */ + public Builder distributedAutonomousDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedAutonomousDatabase + distributedAutonomousDatabase) { + this.distributedAutonomousDatabase = distributedAutonomousDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDistributedAutonomousDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedAutonomousDatabase(o.getDistributedAutonomousDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDistributedAutonomousDatabaseResponse build() { + return new UpdateDistributedAutonomousDatabaseResponse( + __httpStatusCode__, headers, opcRequestId, etag, distributedAutonomousDatabase); + } + } + + /** + * 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(",distributedAutonomousDatabase=") + .append(String.valueOf(distributedAutonomousDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedAutonomousDatabaseResponse)) { + return false; + } + + UpdateDistributedAutonomousDatabaseResponse other = + (UpdateDistributedAutonomousDatabaseResponse) 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.distributedAutonomousDatabase, other.distributedAutonomousDatabase); + } + + @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.distributedAutonomousDatabase == null + ? 43 + : this.distributedAutonomousDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabasePrivateEndpointResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabasePrivateEndpointResponse.java new file mode 100644 index 0000000000..a8d829dc28 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabasePrivateEndpointResponse.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabasePrivateEndpointResponse + 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + getDistributedDatabasePrivateEndpoint() { + return distributedDatabasePrivateEndpoint; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedDatabasePrivateEndpoint" + }) + private UpdateDistributedDatabasePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedDatabasePrivateEndpoint instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint; + + /** + * The returned DistributedDatabasePrivateEndpoint instance. + * @param distributedDatabasePrivateEndpoint the value to set + * @return this builder + */ + public Builder distributedDatabasePrivateEndpoint( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabasePrivateEndpoint + distributedDatabasePrivateEndpoint) { + this.distributedDatabasePrivateEndpoint = distributedDatabasePrivateEndpoint; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDistributedDatabasePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabasePrivateEndpoint(o.getDistributedDatabasePrivateEndpoint()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDistributedDatabasePrivateEndpointResponse build() { + return new UpdateDistributedDatabasePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + distributedDatabasePrivateEndpoint); + } + } + + /** + * 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(",distributedDatabasePrivateEndpoint=") + .append(String.valueOf(distributedDatabasePrivateEndpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedDatabasePrivateEndpointResponse)) { + return false; + } + + UpdateDistributedDatabasePrivateEndpointResponse other = + (UpdateDistributedDatabasePrivateEndpointResponse) 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.distributedDatabasePrivateEndpoint, + other.distributedDatabasePrivateEndpoint); + } + + @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.distributedDatabasePrivateEndpoint == null + ? 43 + : this.distributedDatabasePrivateEndpoint.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabaseResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabaseResponse.java new file mode 100644 index 0000000000..49838d7524 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/UpdateDistributedDatabaseResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class UpdateDistributedDatabaseResponse 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @return the value + */ + public com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + getDistributedDatabase() { + return distributedDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "distributedDatabase" + }) + private UpdateDistributedDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.distributedDatabase = distributedDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 DistributedDatabase instance. + */ + private com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase distributedDatabase; + + /** + * The returned DistributedDatabase instance. + * @param distributedDatabase the value to set + * @return this builder + */ + public Builder distributedDatabase( + com.oracle.bmc.distributeddatabasev26.model.DistributedDatabase + distributedDatabase) { + this.distributedDatabase = distributedDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDistributedDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + distributedDatabase(o.getDistributedDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDistributedDatabaseResponse build() { + return new UpdateDistributedDatabaseResponse( + __httpStatusCode__, headers, opcRequestId, etag, distributedDatabase); + } + } + + /** + * 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(",distributedDatabase=").append(String.valueOf(distributedDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDistributedDatabaseResponse)) { + return false; + } + + UpdateDistributedDatabaseResponse other = (UpdateDistributedDatabaseResponse) 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.distributedDatabase, other.distributedDatabase); + } + + @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.distributedDatabase == null + ? 43 + : this.distributedDatabase.hashCode()); + return result; + } +} diff --git a/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseCaBundleResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseCaBundleResponse.java new file mode 100644 index 0000000000..8c5c951ad3 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseCaBundleResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseCaBundleResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ValidateDistributedAutonomousDatabaseCaBundleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ValidateDistributedAutonomousDatabaseCaBundleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ValidateDistributedAutonomousDatabaseCaBundleResponse build() { + return new ValidateDistributedAutonomousDatabaseCaBundleResponse( + __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 ValidateDistributedAutonomousDatabaseCaBundleResponse)) { + return false; + } + + ValidateDistributedAutonomousDatabaseCaBundleResponse other = + (ValidateDistributedAutonomousDatabaseCaBundleResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseNetworkResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseNetworkResponse.java new file mode 100644 index 0000000000..6a102fade2 --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedAutonomousDatabaseNetworkResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedAutonomousDatabaseNetworkResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ValidateDistributedAutonomousDatabaseNetworkResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ValidateDistributedAutonomousDatabaseNetworkResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ValidateDistributedAutonomousDatabaseNetworkResponse build() { + return new ValidateDistributedAutonomousDatabaseNetworkResponse( + __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 ValidateDistributedAutonomousDatabaseNetworkResponse)) { + return false; + } + + ValidateDistributedAutonomousDatabaseNetworkResponse other = + (ValidateDistributedAutonomousDatabaseNetworkResponse) 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-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedDatabaseNetworkResponse.java b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedDatabaseNetworkResponse.java new file mode 100644 index 0000000000..b0cd81c81b --- /dev/null +++ b/bmc-distributeddatabasev26/src/main/java/com/oracle/bmc/distributeddatabasev26/responses/ValidateDistributedDatabaseNetworkResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.distributeddatabasev26.responses; + +import com.oracle.bmc.distributeddatabasev26.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260101") +public class ValidateDistributedDatabaseNetworkResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 ValidateDistributedDatabaseNetworkResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(ValidateDistributedDatabaseNetworkResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ValidateDistributedDatabaseNetworkResponse build() { + return new ValidateDistributedDatabaseNetworkResponse( + __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 ValidateDistributedDatabaseNetworkResponse)) { + return false; + } + + ValidateDistributedDatabaseNetworkResponse other = + (ValidateDistributedDatabaseNetworkResponse) 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-dns/pom.xml b/bmc-dns/pom.xml index f9428b940f..9869cb5e79 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.95.0 + 2.97.0 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index 8bf5a6f33e..c48125a8db 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-emaildataplane/pom.xml b/bmc-emaildataplane/pom.xml index 290730d679..01ba2da082 100644 --- a/bmc-emaildataplane/pom.xml +++ b/bmc-emaildataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-emaildataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-emwarehouse/pom.xml b/bmc-emwarehouse/pom.xml index 4d461a2363..db7310204a 100644 --- a/bmc-emwarehouse/pom.xml +++ b/bmc-emwarehouse/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-emwarehouse @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-encryption/pom.xml b/bmc-encryption/pom.xml index 7732ec706d..29b6526d07 100644 --- a/bmc-encryption/pom.xml +++ b/bmc-encryption/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,18 +19,18 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.95.0 + 2.97.0 test com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.95.0 + 2.97.0 com.fasterxml.jackson.core diff --git a/bmc-enforcer-rules/pom.xml b/bmc-enforcer-rules/pom.xml index 0fdf9fdf70..b58b2b69c8 100644 --- a/bmc-enforcer-rules/pom.xml +++ b/bmc-enforcer-rules/pom.xml @@ -6,7 +6,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 oci-java-sdk-enforcer-rules diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index 7ccf9bdd90..a5ecd72d03 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-events @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 9ddfacc29c..886fdafdb7 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-examples @@ -28,7 +28,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.95.0 + 2.97.0 pom import @@ -757,5 +757,13 @@ com.oracle.oci.sdk oci-java-sdk-datacc + + com.oracle.oci.sdk + oci-java-sdk-ddfs + + + com.oracle.oci.sdk + oci-java-sdk-distributeddatabasev26 + \ No newline at end of file diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 61fb6ebeac..fcba020b48 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-fleetappsmanagement/pom.xml b/bmc-fleetappsmanagement/pom.xml index c93a29e6de..ee93a0885b 100644 --- a/bmc-fleetappsmanagement/pom.xml +++ b/bmc-fleetappsmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-fleetappsmanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-fleetsoftwareupdate/pom.xml b/bmc-fleetsoftwareupdate/pom.xml index 230e9a4c01..edb5c861e7 100644 --- a/bmc-fleetsoftwareupdate/pom.xml +++ b/bmc-fleetsoftwareupdate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-fleetsoftwareupdate @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index cabb48c204..a285348969 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.95.0 + 2.97.0 pom import @@ -703,5 +703,13 @@ com.oracle.oci.sdk oci-java-sdk-datacc + + com.oracle.oci.sdk + oci-java-sdk-ddfs + + + com.oracle.oci.sdk + oci-java-sdk-distributeddatabasev26 + \ No newline at end of file diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index 19365125fe..7fb95ec3da 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-functions @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-fusionapps/pom.xml b/bmc-fusionapps/pom.xml index 8e90f5f7e0..3462d54ee7 100644 --- a/bmc-fusionapps/pom.xml +++ b/bmc-fusionapps/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-fusionapps @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-gdp/pom.xml b/bmc-gdp/pom.xml index 6928ee93d9..97b2a2e1ea 100644 --- a/bmc-gdp/pom.xml +++ b/bmc-gdp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-gdp @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-generativeai/pom.xml b/bmc-generativeai/pom.xml index d720109ec6..949953fcab 100644 --- a/bmc-generativeai/pom.xml +++ b/bmc-generativeai/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-generativeai @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java index 20beb35251..6461281974 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java @@ -212,6 +212,9 @@ public Builder unitCount(Integer unitCount) { * - OAI_B200_X4 * - OAI_B200_X8 * - SB_B200_X1 + * - COHERE_B300_X1 + * - META_B300_X1 + * - OAI_B300_X1 * **/ @com.fasterxml.jackson.annotation.JsonProperty("unitShape") @@ -285,6 +288,9 @@ public Builder unitCount(Integer unitCount) { * - OAI_B200_X4 * - OAI_B200_X8 * - SB_B200_X1 + * - COHERE_B300_X1 + * - META_B300_X1 + * - OAI_B300_X1 * * @param unitShape the value to set * @return this builder @@ -553,6 +559,9 @@ public Integer getUnitCount() { * - OAI_B200_X4 * - OAI_B200_X8 * - SB_B200_X1 + * - COHERE_B300_X1 + * - META_B300_X1 + * - OAI_B300_X1 * **/ @com.fasterxml.jackson.annotation.JsonProperty("unitShape") @@ -626,6 +635,9 @@ public Integer getUnitCount() { * - OAI_B200_X4 * - OAI_B200_X8 * - SB_B200_X1 + * - COHERE_B300_X1 + * - META_B300_X1 + * - OAI_B300_X1 * * @return the value **/ diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java index 0b348c14d6..5c96786e2f 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java @@ -740,6 +740,9 @@ public enum UnitShape { MetaB200X2("META_B200_X2"), MetaB200X4("META_B200_X4"), MetaB200X8("META_B200_X8"), + CohereB300X1("COHERE_B300_X1"), + MetaB300X1("META_B300_X1"), + OaiB300X1("OAI_B300_X1"), LargeCohereV3("LARGE_COHERE_V3"), RerankCohere("RERANK_COHERE"), SmallGenericV1("SMALL_GENERIC_V1"), diff --git a/bmc-generativeaiagent/pom.xml b/bmc-generativeaiagent/pom.xml index 075ee6fabe..e8779e05f6 100644 --- a/bmc-generativeaiagent/pom.xml +++ b/bmc-generativeaiagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-generativeaiagent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-generativeaiagentruntime/pom.xml b/bmc-generativeaiagentruntime/pom.xml index be2a21cc98..36844cb167 100644 --- a/bmc-generativeaiagentruntime/pom.xml +++ b/bmc-generativeaiagentruntime/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-generativeaiagentruntime @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-generativeaidata/pom.xml b/bmc-generativeaidata/pom.xml index 4908d1e669..f4f081619a 100644 --- a/bmc-generativeaidata/pom.xml +++ b/bmc-generativeaidata/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-generativeaidata @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-generativeaiinference/pom.xml b/bmc-generativeaiinference/pom.xml index 6f2dcc6f5e..ffe62e4848 100644 --- a/bmc-generativeaiinference/pom.xml +++ b/bmc-generativeaiinference/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-generativeaiinference @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-genericartifactscontent/pom.xml b/bmc-genericartifactscontent/pom.xml index 44d7a7f8a9..9e1fda9673 100644 --- a/bmc-genericartifactscontent/pom.xml +++ b/bmc-genericartifactscontent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-genericartifactscontent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-goldengate/pom.xml b/bmc-goldengate/pom.xml index 716ed3bfff..1d5715afdb 100644 --- a/bmc-goldengate/pom.xml +++ b/bmc-goldengate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-goldengate @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-governancerulescontrolplane/pom.xml b/bmc-governancerulescontrolplane/pom.xml index faee69219a..5eede34882 100644 --- a/bmc-governancerulescontrolplane/pom.xml +++ b/bmc-governancerulescontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-governancerulescontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 9c445378b7..de31a9610b 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-healthchecks @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index ec8635c864..b38769292f 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-identitydataplane/pom.xml b/bmc-identitydataplane/pom.xml index 9fcb60a5f8..ca7207ce19 100644 --- a/bmc-identitydataplane/pom.xml +++ b/bmc-identitydataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-identitydataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-identitydomains/pom.xml b/bmc-identitydomains/pom.xml index dffa0bb3c7..f657766551 100644 --- a/bmc-identitydomains/pom.xml +++ b/bmc-identitydomains/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-identitydomains @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-integration/pom.xml b/bmc-integration/pom.xml index 219ac4fdbf..2815d60669 100644 --- a/bmc-integration/pom.xml +++ b/bmc-integration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-integration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-iot/pom.xml b/bmc-iot/pom.xml index d730cb1cc5..6a59c81fd3 100644 --- a/bmc-iot/pom.xml +++ b/bmc-iot/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-iot @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-jms/pom.xml b/bmc-jms/pom.xml index 253ed85e58..28da3dc4e8 100644 --- a/bmc-jms/pom.xml +++ b/bmc-jms/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-jms @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-jmsjavadownloads/pom.xml b/bmc-jmsjavadownloads/pom.xml index 28733c1804..a1c3cc7d1c 100644 --- a/bmc-jmsjavadownloads/pom.xml +++ b/bmc-jmsjavadownloads/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-jmsjavadownloads @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-jmsutils/pom.xml b/bmc-jmsutils/pom.xml index d8fd46c4d3..f3aa1e8674 100644 --- a/bmc-jmsutils/pom.xml +++ b/bmc-jmsutils/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-jmsutils @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index ed68245652..da6e5f10fc 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-keymanagement @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-licensemanager/pom.xml b/bmc-licensemanager/pom.xml index 6e70834444..74d24a2372 100644 --- a/bmc-licensemanager/pom.xml +++ b/bmc-licensemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-licensemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index 071284474c..0539a72652 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-limits @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-limitsincrease/pom.xml b/bmc-limitsincrease/pom.xml index 75e95a7ca5..8fd0c5301e 100644 --- a/bmc-limitsincrease/pom.xml +++ b/bmc-limitsincrease/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-limitsincrease @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index 0af4f48053..b5e4bd63a3 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-lockbox/pom.xml b/bmc-lockbox/pom.xml index 7169075915..a55c0b33e1 100644 --- a/bmc-lockbox/pom.xml +++ b/bmc-lockbox/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-lockbox @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-loganalytics/pom.xml b/bmc-loganalytics/pom.xml index 480f4211bb..c50164e2fd 100644 --- a/bmc-loganalytics/pom.xml +++ b/bmc-loganalytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-loganalytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-logging/pom.xml b/bmc-logging/pom.xml index 6d433811f5..ecd2228867 100644 --- a/bmc-logging/pom.xml +++ b/bmc-logging/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-logging @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-loggingingestion/pom.xml b/bmc-loggingingestion/pom.xml index fd376ee124..45a3f2a715 100644 --- a/bmc-loggingingestion/pom.xml +++ b/bmc-loggingingestion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-loggingingestion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-loggingsearch/pom.xml b/bmc-loggingsearch/pom.xml index 75cc63ae12..aeb420f628 100644 --- a/bmc-loggingsearch/pom.xml +++ b/bmc-loggingsearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-loggingsearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-lustrefilestorage/pom.xml b/bmc-lustrefilestorage/pom.xml index 6df49c5c2e..10abed28af 100644 --- a/bmc-lustrefilestorage/pom.xml +++ b/bmc-lustrefilestorage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-lustrefilestorage @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-managedkafka/pom.xml b/bmc-managedkafka/pom.xml index af27a0ba12..efe028a2c5 100644 --- a/bmc-managedkafka/pom.xml +++ b/bmc-managedkafka/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-managedkafka @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-managementagent/pom.xml b/bmc-managementagent/pom.xml index 0e1b1ff08f..efc173f76d 100644 --- a/bmc-managementagent/pom.xml +++ b/bmc-managementagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-managementagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-managementdashboard/pom.xml b/bmc-managementdashboard/pom.xml index b9205ae6a0..594fd148b7 100644 --- a/bmc-managementdashboard/pom.xml +++ b/bmc-managementdashboard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-managementdashboard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-marketplace/pom.xml b/bmc-marketplace/pom.xml index d4cab83556..92238e2f10 100644 --- a/bmc-marketplace/pom.xml +++ b/bmc-marketplace/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-marketplace @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-marketplaceprivateoffer/pom.xml b/bmc-marketplaceprivateoffer/pom.xml index 4d405d9b87..24f54e53e0 100644 --- a/bmc-marketplaceprivateoffer/pom.xml +++ b/bmc-marketplaceprivateoffer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-marketplaceprivateoffer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/Offer.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/Offer.java index d22040ded4..7afe7ce74b 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/Offer.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/Offer.java @@ -121,6 +121,18 @@ public interface Offer extends AutoCloseable { */ ListOffersResponse listOffers(ListOffersRequest request); + /** + * Sends an Offer to be reviewed and accepted by the buyer. Validation will be run on the offer first to verify the offer is valid and contains all required fields. + * @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 SendOffer API. + */ + SendOfferResponse sendOffer(SendOfferRequest request); + /** * Updates the Offer * @param request The request object containing the details to send @@ -133,6 +145,18 @@ public interface Offer extends AutoCloseable { */ UpdateOfferResponse updateOffer(UpdateOfferRequest request); + /** + * Withdraws an Offer and sends it back into DRAFT state. Offers can only be withdrawn before they are accepted by the buyer. + * @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 WithdrawOffer API. + */ + WithdrawOfferResponse withdrawOffer(WithdrawOfferRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsync.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsync.java index f60717e21d..454b9a3e25 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsync.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsync.java @@ -132,6 +132,20 @@ java.util.concurrent.Future listOffers( ListOffersRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Sends an Offer to be reviewed and accepted by the buyer. Validation will be run on the offer first to verify the offer is valid and contains all required fields. + * + * @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 sendOffer( + SendOfferRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Updates the Offer * @@ -145,4 +159,19 @@ java.util.concurrent.Future listOffers( java.util.concurrent.Future updateOffer( UpdateOfferRequest request, com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Withdraws an Offer and sends it back into DRAFT state. Offers can only be withdrawn before they are accepted by the buyer. + * + * @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 withdrawOffer( + WithdrawOfferRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); } diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsyncClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsyncClient.java index 7247bb139c..ee50c1ba7f 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsyncClient.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferAsyncClient.java @@ -680,6 +680,45 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future sendOffer( + SendOfferRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async sendOffer"); + final SendOfferRequest interceptedRequest = SendOfferConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SendOfferConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Offer", "SendOffer", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + SendOfferConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SendOfferRequest, SendOfferResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateOffer( UpdateOfferRequest request, @@ -725,4 +764,45 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future withdrawOffer( + WithdrawOfferRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async withdrawOffer"); + final WithdrawOfferRequest interceptedRequest = + WithdrawOfferConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + WithdrawOfferConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Offer", "WithdrawOffer", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + WithdrawOfferConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + WithdrawOfferRequest, WithdrawOfferResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + WithdrawOfferRequest, WithdrawOfferResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferClient.java index 7fdb527e35..faa5ddc632 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferClient.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferClient.java @@ -726,6 +726,38 @@ public ListOffersResponse listOffers(ListOffersRequest request) { }); } + @Override + public SendOfferResponse sendOffer(SendOfferRequest request) { + LOG.trace("Called sendOffer"); + final SendOfferRequest interceptedRequest = SendOfferConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SendOfferConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Offer", "SendOffer", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + SendOfferConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateOfferResponse updateOffer(UpdateOfferRequest request) { LOG.trace("Called updateOffer"); @@ -762,6 +794,39 @@ public UpdateOfferResponse updateOffer(UpdateOfferRequest request) { }); } + @Override + public WithdrawOfferResponse withdrawOffer(WithdrawOfferRequest request) { + LOG.trace("Called withdrawOffer"); + final WithdrawOfferRequest interceptedRequest = + WithdrawOfferConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + WithdrawOfferConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Offer", "WithdrawOffer", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + WithdrawOfferConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public OfferWaiters getWaiters() { return waiters; diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuote.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuote.java new file mode 100644 index 0000000000..1f97d9ddd8 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuote.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Use the Marketplace Publisher API to manage the publishing of applications in Oracle Cloud Infrastructure Marketplace. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public interface OfferQuote 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); + + /** + * Creates a new offer quote. + * + * @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 CreateOfferQuote API. + */ + CreateOfferQuoteResponse createOfferQuote(CreateOfferQuoteRequest request); + + /** + * Deletes an offer quote resource by identifier. + * @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 DeleteOfferQuote API. + */ + DeleteOfferQuoteResponse deleteOfferQuote(DeleteOfferQuoteRequest request); + + /** + * Gets an offer quote by identifier. + * @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 GetOfferQuote API. + */ + GetOfferQuoteResponse getOfferQuote(GetOfferQuoteRequest request); + + /** + * Gets an offer quote internal details by identifier. + * @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 GetOfferQuoteInternalDetail API. + */ + GetOfferQuoteInternalDetailResponse getOfferQuoteInternalDetail( + GetOfferQuoteInternalDetailRequest request); + + /** + * Returns a list of offer quotes. Requires either a reseller compartment ID or an ISV compartment 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 ListOfferQuotes API. + */ + ListOfferQuotesResponse listOfferQuotes(ListOfferQuotesRequest request); + + /** + * ISV responds to an offer quote for reseller to review. + * @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 RespondToOfferQuote API. + */ + RespondToOfferQuoteResponse respondToOfferQuote(RespondToOfferQuoteRequest request); + + /** + * Sends an offer quote to be reviewed and updated by the ISV. Validation will be run on the offer quote first to verify it is valid and contains all required fields. + * @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 SendOfferQuote API. + */ + SendOfferQuoteResponse sendOfferQuote(SendOfferQuoteRequest request); + + /** + * Updates the offer quote. + * @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 UpdateOfferQuote API. + */ + UpdateOfferQuoteResponse updateOfferQuote(UpdateOfferQuoteRequest request); + + /** + * Withdraws an offer quote and transitions to previous state. Offer quotes can only be withdrawn by reseller before the ISV response and withdrawn by the ISV before reseller acceptance. + * @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 WithdrawOfferQuote API. + */ + WithdrawOfferQuoteResponse withdrawOfferQuote(WithdrawOfferQuoteRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + OfferQuoteWaiters 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. + */ + OfferQuotePaginators getPaginators(); +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsync.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsync.java new file mode 100644 index 0000000000..6917f8fc03 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsync.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Use the Marketplace Publisher API to manage the publishing of applications in Oracle Cloud Infrastructure Marketplace. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public interface OfferQuoteAsync 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); + + /** + * Creates a new offer quote. + * + * + * @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 createOfferQuote( + CreateOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes an offer quote resource by identifier. + * + * @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 deleteOfferQuote( + DeleteOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets an offer quote by identifier. + * + * @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 getOfferQuote( + GetOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets an offer quote internal details by identifier. + * + * @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 getOfferQuoteInternalDetail( + GetOfferQuoteInternalDetailRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetOfferQuoteInternalDetailRequest, GetOfferQuoteInternalDetailResponse> + handler); + + /** + * Returns a list of offer quotes. Requires either a reseller compartment ID or an ISV compartment 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 listOfferQuotes( + ListOfferQuotesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * ISV responds to an offer quote for reseller to review. + * + * @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 respondToOfferQuote( + RespondToOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler< + RespondToOfferQuoteRequest, RespondToOfferQuoteResponse> + handler); + + /** + * Sends an offer quote to be reviewed and updated by the ISV. Validation will be run on the offer quote first to verify it is valid and contains all required fields. + * + * @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 sendOfferQuote( + SendOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates the offer quote. + * + * @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 updateOfferQuote( + UpdateOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Withdraws an offer quote and transitions to previous state. Offer quotes can only be withdrawn by reseller before the ISV response and withdrawn by the ISV before reseller acceptance. + * + * @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 withdrawOfferQuote( + WithdrawOfferQuoteRequest request, + com.oracle.bmc.responses.AsyncHandler< + WithdrawOfferQuoteRequest, WithdrawOfferQuoteResponse> + handler); +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsyncClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsyncClient.java new file mode 100644 index 0000000000..09d673c147 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteAsyncClient.java @@ -0,0 +1,884 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.internal.http.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for OfferQuote 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class OfferQuoteAsyncClient implements OfferQuoteAsync { + /** + * Service instance for OfferQuote. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(OfferQuoteClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://private-offer.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OfferQuoteAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public OfferQuoteAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public OfferQuoteAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public OfferQuoteAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public OfferQuoteAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public OfferQuoteAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public OfferQuoteAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public OfferQuoteAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public OfferQuoteAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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); + 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 OfferQuoteAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new OfferQuoteAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createOfferQuote( + CreateOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOfferQuoteRequest, CreateOfferQuoteResponse> + handler) { + LOG.trace("Called async createOfferQuote"); + final CreateOfferQuoteRequest interceptedRequest = + CreateOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "CreateOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CreateOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOfferQuoteRequest, CreateOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOfferQuoteDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOfferQuoteRequest, CreateOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteOfferQuote( + DeleteOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOfferQuoteRequest, DeleteOfferQuoteResponse> + handler) { + LOG.trace("Called async deleteOfferQuote"); + final DeleteOfferQuoteRequest interceptedRequest = + DeleteOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "DeleteOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + DeleteOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOfferQuoteRequest, DeleteOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteOfferQuoteRequest, DeleteOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getOfferQuote( + GetOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getOfferQuote"); + final GetOfferQuoteRequest interceptedRequest = + GetOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "GetOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetOfferQuoteConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOfferQuoteRequest, GetOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetOfferQuoteRequest, GetOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getOfferQuoteInternalDetail( + GetOfferQuoteInternalDetailRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetOfferQuoteInternalDetailRequest, + GetOfferQuoteInternalDetailResponse> + handler) { + LOG.trace("Called async getOfferQuoteInternalDetail"); + final GetOfferQuoteInternalDetailRequest interceptedRequest = + GetOfferQuoteInternalDetailConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOfferQuoteInternalDetailConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", + "GetOfferQuoteInternalDetail", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetOfferQuoteInternalDetailResponse> + transformer = + GetOfferQuoteInternalDetailConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetOfferQuoteInternalDetailRequest, GetOfferQuoteInternalDetailResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOfferQuoteInternalDetailRequest, + GetOfferQuoteInternalDetailResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetOfferQuoteInternalDetailRequest, GetOfferQuoteInternalDetailResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listOfferQuotes( + ListOfferQuotesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOfferQuotesRequest, ListOfferQuotesResponse> + handler) { + LOG.trace("Called async listOfferQuotes"); + final ListOfferQuotesRequest interceptedRequest = + ListOfferQuotesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOfferQuotesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "ListOfferQuotes", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListOfferQuotesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOfferQuotesRequest, ListOfferQuotesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOfferQuotesRequest, ListOfferQuotesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future respondToOfferQuote( + RespondToOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RespondToOfferQuoteRequest, RespondToOfferQuoteResponse> + handler) { + LOG.trace("Called async respondToOfferQuote"); + final RespondToOfferQuoteRequest interceptedRequest = + RespondToOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RespondToOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "RespondToOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + RespondToOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RespondToOfferQuoteRequest, RespondToOfferQuoteResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RespondToOfferQuoteRequest, RespondToOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRespondToOfferQuoteDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RespondToOfferQuoteRequest, RespondToOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future sendOfferQuote( + SendOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SendOfferQuoteRequest, SendOfferQuoteResponse> + handler) { + LOG.trace("Called async sendOfferQuote"); + final SendOfferQuoteRequest interceptedRequest = + SendOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SendOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "SendOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + SendOfferQuoteConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SendOfferQuoteRequest, SendOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SendOfferQuoteRequest, SendOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateOfferQuote( + UpdateOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateOfferQuoteRequest, UpdateOfferQuoteResponse> + handler) { + LOG.trace("Called async updateOfferQuote"); + final UpdateOfferQuoteRequest interceptedRequest = + UpdateOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "UpdateOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + UpdateOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateOfferQuoteRequest, UpdateOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateOfferQuoteDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateOfferQuoteRequest, UpdateOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future withdrawOfferQuote( + WithdrawOfferQuoteRequest request, + final com.oracle.bmc.responses.AsyncHandler< + WithdrawOfferQuoteRequest, WithdrawOfferQuoteResponse> + handler) { + LOG.trace("Called async withdrawOfferQuote"); + final WithdrawOfferQuoteRequest interceptedRequest = + WithdrawOfferQuoteConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + WithdrawOfferQuoteConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "WithdrawOfferQuote", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + WithdrawOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + WithdrawOfferQuoteRequest, WithdrawOfferQuoteResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + WithdrawOfferQuoteRequest, WithdrawOfferQuoteResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteClient.java new file mode 100644 index 0000000000..4f29e47215 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteClient.java @@ -0,0 +1,896 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.internal.http.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class OfferQuoteClient implements OfferQuote { + /** + * Service instance for OfferQuote. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(OfferQuoteClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://private-offer.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OfferQuoteClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final OfferQuoteWaiters waiters; + + private final OfferQuotePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public OfferQuoteClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public OfferQuoteClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public OfferQuoteClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public OfferQuoteClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public OfferQuoteClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public OfferQuoteClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public OfferQuoteClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public OfferQuoteClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected OfferQuoteClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("OfferQuote-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new OfferQuoteWaiters(executorService, this); + + this.paginators = new OfferQuotePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * 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); + 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 OfferQuoteClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new OfferQuoteClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateOfferQuoteResponse createOfferQuote(CreateOfferQuoteRequest request) { + LOG.trace("Called createOfferQuote"); + final CreateOfferQuoteRequest interceptedRequest = + CreateOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "CreateOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + CreateOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateOfferQuoteDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteOfferQuoteResponse deleteOfferQuote(DeleteOfferQuoteRequest request) { + LOG.trace("Called deleteOfferQuote"); + final DeleteOfferQuoteRequest interceptedRequest = + DeleteOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "DeleteOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + DeleteOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetOfferQuoteResponse getOfferQuote(GetOfferQuoteRequest request) { + LOG.trace("Called getOfferQuote"); + final GetOfferQuoteRequest interceptedRequest = + GetOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "GetOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetOfferQuoteConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetOfferQuoteInternalDetailResponse getOfferQuoteInternalDetail( + GetOfferQuoteInternalDetailRequest request) { + LOG.trace("Called getOfferQuoteInternalDetail"); + final GetOfferQuoteInternalDetailRequest interceptedRequest = + GetOfferQuoteInternalDetailConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOfferQuoteInternalDetailConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", + "GetOfferQuoteInternalDetail", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetOfferQuoteInternalDetailConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListOfferQuotesResponse listOfferQuotes(ListOfferQuotesRequest request) { + LOG.trace("Called listOfferQuotes"); + final ListOfferQuotesRequest interceptedRequest = + ListOfferQuotesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOfferQuotesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "ListOfferQuotes", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListOfferQuotesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RespondToOfferQuoteResponse respondToOfferQuote(RespondToOfferQuoteRequest request) { + LOG.trace("Called respondToOfferQuote"); + final RespondToOfferQuoteRequest interceptedRequest = + RespondToOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RespondToOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "RespondToOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + RespondToOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRespondToOfferQuoteDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SendOfferQuoteResponse sendOfferQuote(SendOfferQuoteRequest request) { + LOG.trace("Called sendOfferQuote"); + final SendOfferQuoteRequest interceptedRequest = + SendOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SendOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "SendOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + SendOfferQuoteConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateOfferQuoteResponse updateOfferQuote(UpdateOfferQuoteRequest request) { + LOG.trace("Called updateOfferQuote"); + final UpdateOfferQuoteRequest interceptedRequest = + UpdateOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "UpdateOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + UpdateOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateOfferQuoteDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public WithdrawOfferQuoteResponse withdrawOfferQuote(WithdrawOfferQuoteRequest request) { + LOG.trace("Called withdrawOfferQuote"); + final WithdrawOfferQuoteRequest interceptedRequest = + WithdrawOfferQuoteConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + WithdrawOfferQuoteConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OfferQuote", "WithdrawOfferQuote", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + WithdrawOfferQuoteConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public OfferQuoteWaiters getWaiters() { + return waiters; + } + + @Override + public OfferQuotePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuotePaginators.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuotePaginators.java new file mode 100644 index 0000000000..50e0bfa4a4 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuotePaginators.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of OfferQuote 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class OfferQuotePaginators { + private final OfferQuote client; + + public OfferQuotePaginators(OfferQuote client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOfferQuotes 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 listOfferQuotesResponseIterator( + final ListOfferQuotesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOfferQuotesRequest.Builder, ListOfferQuotesRequest, ListOfferQuotesResponse>( + new java.util.function.Supplier() { + @Override + public ListOfferQuotesRequest.Builder get() { + return ListOfferQuotesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOfferQuotesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOfferQuotesRequest.Builder>, + ListOfferQuotesRequest>() { + @Override + public ListOfferQuotesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOfferQuotesRequest.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 ListOfferQuotesResponse apply(ListOfferQuotesRequest request) { + return client.listOfferQuotes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteSummary} objects + * contained in responses from the listOfferQuotes 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.marketplaceprivateoffer.model.OfferQuoteSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOfferQuotesRecordIterator(final ListOfferQuotesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOfferQuotesRequest.Builder, ListOfferQuotesRequest, ListOfferQuotesResponse, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteSummary>( + new java.util.function.Supplier() { + @Override + public ListOfferQuotesRequest.Builder get() { + return ListOfferQuotesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOfferQuotesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOfferQuotesRequest.Builder>, + ListOfferQuotesRequest>() { + @Override + public ListOfferQuotesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOfferQuotesRequest.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 ListOfferQuotesResponse apply(ListOfferQuotesRequest request) { + return client.listOfferQuotes(request); + } + }, + new java.util.function.Function< + ListOfferQuotesResponse, + java.util.List< + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteSummary> + apply(ListOfferQuotesResponse response) { + return response.getOfferQuoteCollection().getItems(); + } + }); + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteWaiters.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteWaiters.java new file mode 100644 index 0000000000..1fce70c085 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/OfferQuoteWaiters.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of OfferQuote. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class OfferQuoteWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final OfferQuote client; + + public OfferQuoteWaiters( + java.util.concurrent.ExecutorService executorService, OfferQuote 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 forOfferQuote( + GetOfferQuoteRequest request, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.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 forOfferQuote( + 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 forOfferQuote( + GetOfferQuoteRequest request, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.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 forOfferQuote( + 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 forOfferQuote( + GetOfferQuoteRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.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 forOfferQuote( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for OfferQuote. + private com.oracle.bmc.waiter.Waiter forOfferQuote( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetOfferQuoteRequest request, + final com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.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< + GetOfferQuoteRequest, GetOfferQuoteResponse>() { + @Override + public GetOfferQuoteResponse apply(GetOfferQuoteRequest request) { + return client.getOfferQuote(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetOfferQuoteResponse response) { + return targetStatesSet.contains( + response.getOfferQuote().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote + .LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachment.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachment.java new file mode 100644 index 0000000000..40babbeaa5 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachment.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Use the Marketplace Publisher API to manage the publishing of applications in Oracle Cloud Infrastructure Marketplace. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public interface QuoteAttachment 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); + + /** + * Creates a new offer quote attachment. + * @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 CreateQuoteAttachment API. + */ + CreateQuoteAttachmentResponse createQuoteAttachment(CreateQuoteAttachmentRequest request); + + /** + * Deletes an offer quote attachment resource by identifier. + * @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 DeleteQuoteAttachment API. + */ + DeleteQuoteAttachmentResponse deleteQuoteAttachment(DeleteQuoteAttachmentRequest request); + + /** + * Gets an offer quote attachment by identifier. + * @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 GetQuoteAttachment API. + */ + GetQuoteAttachmentResponse getQuoteAttachment(GetQuoteAttachmentRequest request); + + /** + * Gets an offer quote attachment content by identifier. + * @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 GetQuoteAttachmentContent API. + */ + GetQuoteAttachmentContentResponse getQuoteAttachmentContent( + GetQuoteAttachmentContentRequest request); + + /** + * Returns a list of offer quote attachments. Requires either a reseller compartment ID or an ISV compartment 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 ListQuoteAttachments API. + */ + ListQuoteAttachmentsResponse listQuoteAttachments(ListQuoteAttachmentsRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + QuoteAttachmentWaiters 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. + */ + QuoteAttachmentPaginators getPaginators(); +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsync.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsync.java new file mode 100644 index 0000000000..25928f5b62 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsync.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Use the Marketplace Publisher API to manage the publishing of applications in Oracle Cloud Infrastructure Marketplace. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public interface QuoteAttachmentAsync 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); + + /** + * Creates a new offer quote attachment. + * + * @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 createQuoteAttachment( + CreateQuoteAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateQuoteAttachmentRequest, CreateQuoteAttachmentResponse> + handler); + + /** + * Deletes an offer quote attachment resource by identifier. + * + * @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 deleteQuoteAttachment( + DeleteQuoteAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteQuoteAttachmentRequest, DeleteQuoteAttachmentResponse> + handler); + + /** + * Gets an offer quote attachment by identifier. + * + * @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 getQuoteAttachment( + GetQuoteAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentRequest, GetQuoteAttachmentResponse> + handler); + + /** + * Gets an offer quote attachment content by identifier. + * + * @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 getQuoteAttachmentContent( + GetQuoteAttachmentContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentContentRequest, GetQuoteAttachmentContentResponse> + handler); + + /** + * Returns a list of offer quote attachments. Requires either a reseller compartment ID or an ISV compartment 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 listQuoteAttachments( + ListQuoteAttachmentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse> + handler); +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsyncClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsyncClient.java new file mode 100644 index 0000000000..d299074f4d --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentAsyncClient.java @@ -0,0 +1,717 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.internal.http.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Async client implementation for QuoteAttachment 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 + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class QuoteAttachmentAsyncClient implements QuoteAttachmentAsync { + /** + * Service instance for QuoteAttachment. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(QuoteAttachmentClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://private-offer.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(QuoteAttachmentAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public QuoteAttachmentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public QuoteAttachmentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public QuoteAttachmentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public QuoteAttachmentAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public QuoteAttachmentAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public QuoteAttachmentAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public QuoteAttachmentAsyncClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public QuoteAttachmentAsyncClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "QuoteAttachmentAsyncClient", "getQuoteAttachmentContent")); + } + } + + /** + * 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, QuoteAttachmentAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + 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 QuoteAttachmentAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new QuoteAttachmentAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createQuoteAttachment( + CreateQuoteAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateQuoteAttachmentRequest, CreateQuoteAttachmentResponse> + handler) { + LOG.trace("Called async createQuoteAttachment"); + final CreateQuoteAttachmentRequest interceptedRequest = + CreateQuoteAttachmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "CreateQuoteAttachment", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateQuoteAttachmentRequest, CreateQuoteAttachmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateQuoteAttachmentRequest, CreateQuoteAttachmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateQuoteAttachmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateQuoteAttachmentRequest, CreateQuoteAttachmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteQuoteAttachment( + DeleteQuoteAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteQuoteAttachmentRequest, DeleteQuoteAttachmentResponse> + handler) { + LOG.trace("Called async deleteQuoteAttachment"); + final DeleteQuoteAttachmentRequest interceptedRequest = + DeleteQuoteAttachmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "DeleteQuoteAttachment", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteQuoteAttachmentRequest, DeleteQuoteAttachmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteQuoteAttachmentRequest, DeleteQuoteAttachmentResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteQuoteAttachmentRequest, DeleteQuoteAttachmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getQuoteAttachment( + GetQuoteAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentRequest, GetQuoteAttachmentResponse> + handler) { + LOG.trace("Called async getQuoteAttachment"); + final GetQuoteAttachmentRequest interceptedRequest = + GetQuoteAttachmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", "GetQuoteAttachment", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentRequest, GetQuoteAttachmentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetQuoteAttachmentRequest, GetQuoteAttachmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getQuoteAttachmentContent( + GetQuoteAttachmentContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentContentRequest, GetQuoteAttachmentContentResponse> + handler) { + LOG.trace("Called async getQuoteAttachmentContent"); + final GetQuoteAttachmentContentRequest interceptedRequest = + GetQuoteAttachmentContentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuoteAttachmentContentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "GetQuoteAttachmentContent", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetQuoteAttachmentContentResponse> + transformer = + GetQuoteAttachmentContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentContentRequest, GetQuoteAttachmentContentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetQuoteAttachmentContentRequest, + GetQuoteAttachmentContentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetQuoteAttachmentContentRequest, GetQuoteAttachmentContentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listQuoteAttachments( + ListQuoteAttachmentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse> + handler) { + LOG.trace("Called async listQuoteAttachments"); + final ListQuoteAttachmentsRequest interceptedRequest = + ListQuoteAttachmentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListQuoteAttachmentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "ListQuoteAttachments", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListQuoteAttachmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentClient.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentClient.java new file mode 100644 index 0000000000..620c53bcdc --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentClient.java @@ -0,0 +1,767 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.internal.http.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.CircuitBreakerUtils; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class QuoteAttachmentClient implements QuoteAttachment { + /** + * Service instance for QuoteAttachment. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName(QuoteAttachmentClient.class.getName()) + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://private-offer.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(QuoteAttachmentClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final QuoteAttachmentWaiters waiters; + + private final QuoteAttachmentPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + // This pattern matches substrings that are enclosed within curly braces {} + private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = + Pattern.compile("\\{([^}]+)\\}"); + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public QuoteAttachmentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public QuoteAttachmentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public QuoteAttachmentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public QuoteAttachmentClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public QuoteAttachmentClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public QuoteAttachmentClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public QuoteAttachmentClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public QuoteAttachmentClient( + 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( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected QuoteAttachmentClient( + 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, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + java.util.List + additionalSpiClientConfigurators = + com.oracle.bmc.util.internal.SpiClientConfiguratorUtils + .getEnabledSpiClientConfigurators(); + allConfigurators.addAll(additionalSpiClientConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + 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("QuoteAttachment-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new QuoteAttachmentWaiters(executorService, this); + + this.paginators = new QuoteAttachmentPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "QuoteAttachmentClient", "getQuoteAttachmentContent")); + } + } + + /** + * 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); + 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 QuoteAttachmentClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new QuoteAttachmentClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String value = client.getEndpoint(); + if (value.contains("{")) { + Matcher matcher = PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES.matcher(value); + java.lang.StringBuilder params = new java.lang.StringBuilder(); + while (matcher.find()) { + if (params.length() > 0) { + params.append(", "); + } + params.append("{").append(matcher.group(1)).append("}"); + } + LOG.warn( + "Parameters like {} get replaced with appropriate values at request time.", + params.toString()); + } + return client.getEndpoint(); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateQuoteAttachmentResponse createQuoteAttachment( + CreateQuoteAttachmentRequest request) { + LOG.trace("Called createQuoteAttachment"); + final CreateQuoteAttachmentRequest interceptedRequest = + CreateQuoteAttachmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "CreateQuoteAttachment", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateQuoteAttachmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteQuoteAttachmentResponse deleteQuoteAttachment( + DeleteQuoteAttachmentRequest request) { + LOG.trace("Called deleteQuoteAttachment"); + final DeleteQuoteAttachmentRequest interceptedRequest = + DeleteQuoteAttachmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "DeleteQuoteAttachment", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetQuoteAttachmentResponse getQuoteAttachment(GetQuoteAttachmentRequest request) { + LOG.trace("Called getQuoteAttachment"); + final GetQuoteAttachmentRequest interceptedRequest = + GetQuoteAttachmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuoteAttachmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", "GetQuoteAttachment", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + GetQuoteAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetQuoteAttachmentContentResponse getQuoteAttachmentContent( + GetQuoteAttachmentContentRequest request) { + LOG.trace("Called getQuoteAttachmentContent"); + final GetQuoteAttachmentContentRequest interceptedRequest = + GetQuoteAttachmentContentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuoteAttachmentContentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "GetQuoteAttachmentContent", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetQuoteAttachmentContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListQuoteAttachmentsResponse listQuoteAttachments(ListQuoteAttachmentsRequest request) { + LOG.trace("Called listQuoteAttachments"); + final ListQuoteAttachmentsRequest interceptedRequest = + ListQuoteAttachmentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListQuoteAttachmentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "QuoteAttachment", + "ListQuoteAttachments", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListQuoteAttachmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public QuoteAttachmentWaiters getWaiters() { + return waiters; + } + + @Override + public QuoteAttachmentPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentPaginators.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentPaginators.java new file mode 100644 index 0000000000..18dbeed25b --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentPaginators.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of QuoteAttachment 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. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class QuoteAttachmentPaginators { + private final QuoteAttachment client; + + public QuoteAttachmentPaginators(QuoteAttachment client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listQuoteAttachments 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 listQuoteAttachmentsResponseIterator( + final ListQuoteAttachmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListQuoteAttachmentsRequest.Builder, ListQuoteAttachmentsRequest, + ListQuoteAttachmentsResponse>( + new java.util.function.Supplier() { + @Override + public ListQuoteAttachmentsRequest.Builder get() { + return ListQuoteAttachmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListQuoteAttachmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuoteAttachmentsRequest.Builder>, + ListQuoteAttachmentsRequest>() { + @Override + public ListQuoteAttachmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuoteAttachmentsRequest.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< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse>() { + @Override + public ListQuoteAttachmentsResponse apply(ListQuoteAttachmentsRequest request) { + return client.listQuoteAttachments(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentSummary} objects + * contained in responses from the listQuoteAttachments 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.marketplaceprivateoffer.model.QuoteAttachmentSummary} objects + * contained in responses received from the service. + */ + public Iterable + listQuoteAttachmentsRecordIterator(final ListQuoteAttachmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListQuoteAttachmentsRequest.Builder, ListQuoteAttachmentsRequest, + ListQuoteAttachmentsResponse, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentSummary>( + new java.util.function.Supplier() { + @Override + public ListQuoteAttachmentsRequest.Builder get() { + return ListQuoteAttachmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListQuoteAttachmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuoteAttachmentsRequest.Builder>, + ListQuoteAttachmentsRequest>() { + @Override + public ListQuoteAttachmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuoteAttachmentsRequest.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< + ListQuoteAttachmentsRequest, ListQuoteAttachmentsResponse>() { + @Override + public ListQuoteAttachmentsResponse apply(ListQuoteAttachmentsRequest request) { + return client.listQuoteAttachments(request); + } + }, + new java.util.function.Function< + ListQuoteAttachmentsResponse, + java.util.List< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentSummary> + apply(ListQuoteAttachmentsResponse response) { + return response.getQuoteAttachmentCollection().getItems(); + } + }); + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentWaiters.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentWaiters.java new file mode 100644 index 0000000000..6c924c4686 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/QuoteAttachmentWaiters.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer; + +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of QuoteAttachment. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class QuoteAttachmentWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final QuoteAttachment client; + + public QuoteAttachmentWaiters( + java.util.concurrent.ExecutorService executorService, QuoteAttachment 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 + forQuoteAttachment( + GetQuoteAttachmentRequest request, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.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 forQuoteAttachment( + 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 + forQuoteAttachment( + GetQuoteAttachmentRequest request, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.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 forQuoteAttachment( + 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 + forQuoteAttachment( + GetQuoteAttachmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.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 forQuoteAttachment( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for QuoteAttachment. + private com.oracle.bmc.waiter.Waiter + forQuoteAttachment( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetQuoteAttachmentRequest request, + final com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.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< + GetQuoteAttachmentRequest, GetQuoteAttachmentResponse>() { + @Override + public GetQuoteAttachmentResponse apply( + GetQuoteAttachmentRequest request) { + return client.getQuoteAttachment(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetQuoteAttachmentResponse response) { + return targetStatesSet.contains( + response.getQuoteAttachment().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment + .LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/SdkClientsMetadata.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/SdkClientsMetadata.java index 7e4957d92b..70cee66356 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/SdkClientsMetadata.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/SdkClientsMetadata.java @@ -11,6 +11,10 @@ AttachmentAsyncClient.class, AttachmentClient.class, OfferAsyncClient.class, - OfferClient.class + OfferClient.class, + OfferQuoteAsyncClient.class, + OfferQuoteClient.class, + QuoteAttachmentAsyncClient.class, + QuoteAttachmentClient.class }) public final class SdkClientsMetadata {} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateOfferQuoteConverter.java new file mode 100644 index 0000000000..79ed79a57a --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateOfferQuoteConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.CreateOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.CreateOfferQuoteRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.CreateOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateOfferQuoteDetails(), "createOfferQuoteDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220901").path("offerQuotes"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.CreateOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.CreateOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.CreateOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .CreateOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.CreateOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.offerQuote(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateQuoteAttachmentConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateQuoteAttachmentConverter.java new file mode 100644 index 0000000000..fadbe9ba1d --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/CreateQuoteAttachmentConverter.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateQuoteAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateQuoteAttachmentConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.CreateQuoteAttachmentRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.CreateQuoteAttachmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.CreateQuoteAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notNull( + request.getCreateQuoteAttachmentDetails(), + "createQuoteAttachmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("quoteAttachments"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.CreateQuoteAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.CreateQuoteAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.CreateQuoteAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quoteAttachment(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .CreateQuoteAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteOfferQuoteConverter.java new file mode 100644 index 0000000000..c73cee0de1 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteOfferQuoteConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.DeleteOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.DeleteOfferQuoteRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.DeleteOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.DeleteOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.DeleteOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.DeleteOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.DeleteOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteQuoteAttachmentConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteQuoteAttachmentConverter.java new file mode 100644 index 0000000000..37cc6ffce8 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/DeleteQuoteAttachmentConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteQuoteAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteQuoteAttachmentConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.DeleteQuoteAttachmentRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.DeleteQuoteAttachmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.DeleteQuoteAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notBlank(request.getQuoteAttachmentId(), "quoteAttachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("quoteAttachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuoteAttachmentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.DeleteQuoteAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.DeleteQuoteAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.DeleteQuoteAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .DeleteQuoteAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteConverter.java new file mode 100644 index 0000000000..1520479428 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.GetOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.GetOfferQuoteRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.GetOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.GetOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.offerQuote(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteInternalDetailConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteInternalDetailConverter.java new file mode 100644 index 0000000000..4da4c41139 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetOfferQuoteInternalDetailConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteInternalDetailConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetOfferQuoteInternalDetailConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.GetOfferQuoteInternalDetailRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests + .GetOfferQuoteInternalDetailRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.GetOfferQuoteInternalDetailRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("internalDetails"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.GetOfferQuoteInternalDetailResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteInternalDetail>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteInternalDetail + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteInternalDetail + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteInternalDetail> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.offerQuoteInternalDetail(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetOfferQuoteInternalDetailResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentContentConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentContentConverter.java new file mode 100644 index 0000000000..2f8361d4ac --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentContentConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentContentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetQuoteAttachmentContentConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentContentRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentContentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentContentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notBlank(request.getQuoteAttachmentId(), "quoteAttachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("quoteAttachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuoteAttachmentId())) + .path("content"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.GetQuoteAttachmentContentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentContentResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentConverter.java new file mode 100644 index 0000000000..c181647017 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/GetQuoteAttachmentConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetQuoteAttachmentConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.GetQuoteAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notBlank(request.getQuoteAttachmentId(), "quoteAttachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("quoteAttachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuoteAttachmentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetQuoteAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetQuoteAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.GetQuoteAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.GetQuoteAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quoteAttachment(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .GetQuoteAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListOfferQuotesConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListOfferQuotesConverter.java new file mode 100644 index 0000000000..efe8ce9aba --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListOfferQuotesConverter.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListOfferQuotesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOfferQuotesConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.ListOfferQuotesRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.ListOfferQuotesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.ListOfferQuotesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220901").path("offerQuotes"); + + if (request.getResellerCompartmentId() != null) { + target = + target.queryParam( + "resellerCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResellerCompartmentId())); + } + + if (request.getIsvCompartmentId() != null) { + target = + target.queryParam( + "isvCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsvCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.ListOfferQuotesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.ListOfferQuotesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.ListOfferQuotesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .ListOfferQuotesResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .ListOfferQuotesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.ListOfferQuotesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuoteCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .ListOfferQuotesResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .ListOfferQuotesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.offerQuoteCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .ListOfferQuotesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListQuoteAttachmentsConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListQuoteAttachmentsConverter.java new file mode 100644 index 0000000000..3764acd0f7 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/ListQuoteAttachmentsConverter.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListQuoteAttachmentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListQuoteAttachmentsConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.ListQuoteAttachmentsRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.ListQuoteAttachmentsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.ListQuoteAttachmentsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("quoteAttachments"); + + if (request.getResellerCompartmentId() != null) { + target = + target.queryParam( + "resellerCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResellerCompartmentId())); + } + + if (request.getIsvCompartmentId() != null) { + target = + target.queryParam( + "isvCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsvCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.ListQuoteAttachmentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.ListQuoteAttachmentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.ListQuoteAttachmentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .QuoteAttachmentCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quoteAttachmentCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .ListQuoteAttachmentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/RespondToOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/RespondToOfferQuoteConverter.java new file mode 100644 index 0000000000..4d34cf9ff6 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/RespondToOfferQuoteConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class RespondToOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RespondToOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.RespondToOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.RespondToOfferQuoteRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.RespondToOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notNull( + request.getRespondToOfferQuoteDetails(), "respondToOfferQuoteDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("actions") + .path("respondToOfferQuote"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.RespondToOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.RespondToOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.RespondToOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .RespondToOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferConverter.java new file mode 100644 index 0000000000..17d3281be6 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SendOfferConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferRequest interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferId(), "offerId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferId())) + .path("actions") + .path("sendOffer"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse + .Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferQuoteConverter.java new file mode 100644 index 0000000000..a04c1d9a7e --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/SendOfferQuoteConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SendOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferQuoteRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.SendOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("actions") + .path("sendOfferQuote"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.SendOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .SendOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/UpdateOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/UpdateOfferQuoteConverter.java new file mode 100644 index 0000000000..bf15529381 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/UpdateOfferQuoteConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class UpdateOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.UpdateOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.UpdateOfferQuoteRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.UpdateOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + Validate.notNull( + request.getUpdateOfferQuoteDetails(), "updateOfferQuoteDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.UpdateOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.UpdateOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.UpdateOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .UpdateOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .UpdateOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.UpdateOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.marketplaceprivateoffer.model + .OfferQuote> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .UpdateOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .UpdateOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.offerQuote(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .UpdateOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferConverter.java new file mode 100644 index 0000000000..acfaa3db39 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WithdrawOfferConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferId(), "offerId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferId())) + .path("actions") + .path("withdrawOffer"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferQuoteConverter.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferQuoteConverter.java new file mode 100644 index 0000000000..5c746fb419 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/internal/http/WithdrawOfferQuoteConverter.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.marketplaceprivateoffer.model.*; +import com.oracle.bmc.marketplaceprivateoffer.requests.*; +import com.oracle.bmc.marketplaceprivateoffer.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferQuoteConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WithdrawOfferQuoteConverter.class); + + public static com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferQuoteRequest + interceptRequest( + com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferQuoteRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.marketplaceprivateoffer.requests.WithdrawOfferQuoteRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOfferQuoteId(), "offerQuoteId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220901") + .path("offerQuotes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOfferQuoteId())) + .path("actions") + .path("withdrawOfferQuote"); + + if (request.getResellerCompartmentId() != null) { + target = + target.queryParam( + "resellerCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResellerCompartmentId())); + } + + if (request.getIsvCompartmentId() != null) { + target = + target.queryParam( + "isvCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsvCompartmentId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferQuoteResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferQuoteResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferQuoteResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferQuoteResponse>() { + @Override + public com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferQuoteResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.marketplaceprivateoffer.responses.WithdrawOfferQuoteResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferQuoteResponse.Builder + builder = + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferQuoteResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.marketplaceprivateoffer.responses + .WithdrawOfferQuoteResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Attachment.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Attachment.java index 45f7fe1120..3fc09069d3 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Attachment.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Attachment.java @@ -29,8 +29,10 @@ public final class Attachment extends com.oracle.bmc.http.internal.ExplicitlySet "type", "timeCreated", "lifecycleState", + "offerType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public Attachment( String id, @@ -42,8 +44,10 @@ public Attachment( Type type, java.util.Date timeCreated, LifecycleState lifecycleState, + Offer.OfferType offerType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.sellerCompartmentId = sellerCompartmentId; @@ -54,8 +58,10 @@ public Attachment( this.type = type; this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; + this.offerType = offerType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -204,6 +210,22 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private Offer.OfferType offerType; + + /** + * The type of the offer. + * @param offerType the value to set + * @return this builder + **/ + public Builder offerType(Offer.OfferType offerType) { + this.offerType = offerType; + this.__explicitlySet__.add("offerType"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -245,6 +267,26 @@ public Builder 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(); @@ -261,8 +303,10 @@ public Attachment build() { this.type, this.timeCreated, this.lifecycleState, + this.offerType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -298,12 +342,18 @@ public Builder copy(Attachment model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("offerType")) { + this.offerType(model.getOfferType()); + } 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; } } @@ -546,6 +596,20 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private final Offer.OfferType offerType; + + /** + * The type of the offer. + * @return the value + **/ + public Offer.OfferType getOfferType() { + return offerType; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -582,6 +646,24 @@ 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); @@ -605,8 +687,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", type=").append(String.valueOf(this.type)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", offerType=").append(String.valueOf(this.offerType)); 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(); } @@ -630,8 +714,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.offerType, other.offerType) && 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); } @@ -658,8 +744,10 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.offerType == null ? 43 : this.offerType.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/AttachmentSummary.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/AttachmentSummary.java index 0295aa1668..fed0b547f0 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/AttachmentSummary.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/AttachmentSummary.java @@ -28,8 +28,10 @@ public final class AttachmentSummary extends com.oracle.bmc.http.internal.Explic "displayName", "type", "lifecycleState", + "offerType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public AttachmentSummary( String id, @@ -38,8 +40,10 @@ public AttachmentSummary( String displayName, Attachment.Type type, Attachment.LifecycleState lifecycleState, + Offer.OfferType offerType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.offerId = offerId; @@ -47,8 +51,10 @@ public AttachmentSummary( this.displayName = displayName; this.type = type; this.lifecycleState = lifecycleState; + this.offerType = offerType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -149,6 +155,22 @@ public Builder lifecycleState(Attachment.LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private Offer.OfferType offerType; + + /** + * The type of the offer. + * @param offerType the value to set + * @return this builder + **/ + public Builder offerType(Offer.OfferType offerType) { + this.offerType = offerType; + this.__explicitlySet__.add("offerType"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -190,6 +212,26 @@ public Builder 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(); @@ -203,8 +245,10 @@ public AttachmentSummary build() { this.displayName, this.type, this.lifecycleState, + this.offerType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -231,12 +275,18 @@ public Builder copy(AttachmentSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("offerType")) { + this.offerType(model.getOfferType()); + } 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; } } @@ -336,6 +386,20 @@ public Attachment.LifecycleState getLifecycleState() { return lifecycleState; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private final Offer.OfferType offerType; + + /** + * The type of the offer. + * @return the value + **/ + public Offer.OfferType getOfferType() { + return offerType; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -372,6 +436,24 @@ 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); @@ -392,8 +474,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", type=").append(String.valueOf(this.type)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", offerType=").append(String.valueOf(this.offerType)); 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(); } @@ -414,8 +498,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.offerType, other.offerType) && 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); } @@ -431,8 +517,10 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.offerType == null ? 43 : this.offerType.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Contact.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Contact.java index b1bc0abb98..8fa0eb026d 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Contact.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Contact.java @@ -5,7 +5,7 @@ package com.oracle.bmc.marketplaceprivateoffer.model; /** - * The contact information of an individual + * The contact information of an individual. *
* 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 @@ -30,13 +30,13 @@ public Contact(String firstName, String lastName, String email) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The first name of the contact + * The first name of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("firstName") private String firstName; /** - * The first name of the contact + * The first name of the contact. * @param firstName the value to set * @return this builder **/ @@ -46,13 +46,13 @@ public Builder firstName(String firstName) { return this; } /** - * The last name of the contact + * The last name of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("lastName") private String lastName; /** - * The last name of the contact + * The last name of the contact. * @param lastName the value to set * @return this builder **/ @@ -62,13 +62,13 @@ public Builder lastName(String lastName) { return this; } /** - * The email of the contact + * The email of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("email") private String email; /** - * The email of the contact + * The email of the contact. * @param email the value to set * @return this builder **/ @@ -116,13 +116,13 @@ public Builder toBuilder() { } /** - * The first name of the contact + * The first name of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("firstName") private final String firstName; /** - * The first name of the contact + * The first name of the contact. * @return the value **/ public String getFirstName() { @@ -130,13 +130,13 @@ public String getFirstName() { } /** - * The last name of the contact + * The last name of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("lastName") private final String lastName; /** - * The last name of the contact + * The last name of the contact. * @return the value **/ public String getLastName() { @@ -144,13 +144,13 @@ public String getLastName() { } /** - * The email of the contact + * The email of the contact. **/ @com.fasterxml.jackson.annotation.JsonProperty("email") private final String email; /** - * The email of the contact + * The email of the contact. * @return the value **/ public String getEmail() { diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferDetails.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferDetails.java index 5b9dd03174..4d4c8c54d9 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferDetails.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferDetails.java @@ -35,6 +35,8 @@ public final class CreateOfferDetails extends com.oracle.bmc.http.internal.Expli "sellerInformation", "resourceBundles", "customFields", + "offerType", + "offerQuoteIds", "freeformTags", "definedTags" }) @@ -52,6 +54,8 @@ public CreateOfferDetails( SellerInformation sellerInformation, java.util.List resourceBundles, java.util.List customFields, + Offer.OfferType offerType, + java.util.List offerQuoteIds, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -68,6 +72,8 @@ public CreateOfferDetails( this.sellerInformation = sellerInformation; this.resourceBundles = resourceBundles; this.customFields = customFields; + this.offerType = offerType; + this.offerQuoteIds = offerQuoteIds; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -261,6 +267,38 @@ public Builder customFields(java.util.List customFields) { this.__explicitlySet__.add("customFields"); return this; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private Offer.OfferType offerType; + + /** + * The type of the offer. + * @param offerType the value to set + * @return this builder + **/ + public Builder offerType(Offer.OfferType offerType) { + this.offerType = offerType; + this.__explicitlySet__.add("offerType"); + return this; + } + /** + * A list of associated offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteIds") + private java.util.List offerQuoteIds; + + /** + * A list of associated offer quotes. + * @param offerQuoteIds the value to set + * @return this builder + **/ + public Builder offerQuoteIds(java.util.List offerQuoteIds) { + this.offerQuoteIds = offerQuoteIds; + this.__explicitlySet__.add("offerQuoteIds"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -322,6 +360,8 @@ public CreateOfferDetails build() { this.sellerInformation, this.resourceBundles, this.customFields, + this.offerType, + this.offerQuoteIds, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -371,6 +411,12 @@ public Builder copy(CreateOfferDetails model) { if (model.wasPropertyExplicitlySet("customFields")) { this.customFields(model.getCustomFields()); } + if (model.wasPropertyExplicitlySet("offerType")) { + this.offerType(model.getOfferType()); + } + if (model.wasPropertyExplicitlySet("offerQuoteIds")) { + this.offerQuoteIds(model.getOfferQuoteIds()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -553,6 +599,34 @@ public java.util.List getCustomFields() { return customFields; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private final Offer.OfferType offerType; + + /** + * The type of the offer. + * @return the value + **/ + public Offer.OfferType getOfferType() { + return offerType; + } + + /** + * A list of associated offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteIds") + private final java.util.List offerQuoteIds; + + /** + * A list of associated offer quotes. + * @return the value + **/ + public java.util.List getOfferQuoteIds() { + return offerQuoteIds; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -616,6 +690,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sellerInformation=").append(String.valueOf(this.sellerInformation)); sb.append(", resourceBundles=").append(String.valueOf(this.resourceBundles)); sb.append(", customFields=").append(String.valueOf(this.customFields)); + sb.append(", offerType=").append(String.valueOf(this.offerType)); + sb.append(", offerQuoteIds=").append(String.valueOf(this.offerQuoteIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -645,6 +721,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sellerInformation, other.sellerInformation) && java.util.Objects.equals(this.resourceBundles, other.resourceBundles) && java.util.Objects.equals(this.customFields, other.customFields) + && java.util.Objects.equals(this.offerType, other.offerType) + && java.util.Objects.equals(this.offerQuoteIds, other.offerQuoteIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -685,6 +763,10 @@ public int hashCode() { (result * PRIME) + (this.resourceBundles == null ? 43 : this.resourceBundles.hashCode()); result = (result * PRIME) + (this.customFields == null ? 43 : this.customFields.hashCode()); + result = (result * PRIME) + (this.offerType == null ? 43 : this.offerType.hashCode()); + result = + (result * PRIME) + + (this.offerQuoteIds == null ? 43 : this.offerQuoteIds.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(); diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferQuoteDetails.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferQuoteDetails.java new file mode 100644 index 0000000000..5bb3f8facb --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateOfferQuoteDetails.java @@ -0,0 +1,640 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The information about new offer quotes. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOfferQuoteDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOfferQuoteDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "resellerCompartmentId", + "isvCompartmentId", + "isvPublisherId", + "description", + "resourceBundles", + "buyerCompartmentIds", + "resellerInformation", + "isvInformation", + "buyerAcceptanceDeadline", + "buyerOfferDuration", + "freeformTags", + "definedTags" + }) + public CreateOfferQuoteDetails( + String displayName, + String resellerCompartmentId, + String isvCompartmentId, + String isvPublisherId, + String description, + java.util.List resourceBundles, + java.util.List buyerCompartmentIds, + ResellerInformation resellerInformation, + IsvInformation isvInformation, + java.util.Date buyerAcceptanceDeadline, + String buyerOfferDuration, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.resellerCompartmentId = resellerCompartmentId; + this.isvCompartmentId = isvCompartmentId; + this.isvPublisherId = isvPublisherId; + this.description = description; + this.resourceBundles = resourceBundles; + this.buyerCompartmentIds = buyerCompartmentIds; + this.resellerInformation = resellerInformation; + this.isvInformation = isvInformation; + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.buyerOfferDuration = buyerOfferDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Offer quotes identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Offer quotes identifier. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Compartment identifier of the reseller. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private String resellerCompartmentId; + + /** + * Compartment identifier of the reseller. + * @param resellerCompartmentId the value to set + * @return this builder + **/ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + this.__explicitlySet__.add("resellerCompartmentId"); + return this; + } + /** + * Compartment identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * Compartment identifier of the ISV. + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @param isvPublisherId the value to set + * @return this builder + **/ + public Builder isvPublisherId(String isvPublisherId) { + this.isvPublisherId = isvPublisherId; + this.__explicitlySet__.add("isvPublisherId"); + return this; + } + /** + * Description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the offer quote. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * A list of resource bundles associated with an offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer quote. + * @param resourceBundles the value to set + * @return this builder + **/ + public Builder resourceBundles(java.util.List resourceBundles) { + this.resourceBundles = resourceBundles; + this.__explicitlySet__.add("resourceBundles"); + return this; + } + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @param buyerCompartmentIds the value to set + * @return this builder + **/ + public Builder buyerCompartmentIds(java.util.List buyerCompartmentIds) { + this.buyerCompartmentIds = buyerCompartmentIds; + this.__explicitlySet__.add("buyerCompartmentIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private ResellerInformation resellerInformation; + + public Builder resellerInformation(ResellerInformation resellerInformation) { + this.resellerInformation = resellerInformation; + this.__explicitlySet__.add("resellerInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private IsvInformation isvInformation; + + public Builder isvInformation(IsvInformation isvInformation) { + this.isvInformation = isvInformation; + this.__explicitlySet__.add("isvInformation"); + return this; + } + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @param buyerAcceptanceDeadline the value to set + * @return this builder + **/ + public Builder buyerAcceptanceDeadline(java.util.Date buyerAcceptanceDeadline) { + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.__explicitlySet__.add("buyerAcceptanceDeadline"); + return this; + } + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @param buyerOfferDuration the value to set + * @return this builder + **/ + public Builder buyerOfferDuration(String buyerOfferDuration) { + this.buyerOfferDuration = buyerOfferDuration; + this.__explicitlySet__.add("buyerOfferDuration"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 CreateOfferQuoteDetails build() { + CreateOfferQuoteDetails model = + new CreateOfferQuoteDetails( + this.displayName, + this.resellerCompartmentId, + this.isvCompartmentId, + this.isvPublisherId, + this.description, + this.resourceBundles, + this.buyerCompartmentIds, + this.resellerInformation, + this.isvInformation, + this.buyerAcceptanceDeadline, + this.buyerOfferDuration, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOfferQuoteDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("resellerCompartmentId")) { + this.resellerCompartmentId(model.getResellerCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvPublisherId")) { + this.isvPublisherId(model.getIsvPublisherId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("resourceBundles")) { + this.resourceBundles(model.getResourceBundles()); + } + if (model.wasPropertyExplicitlySet("buyerCompartmentIds")) { + this.buyerCompartmentIds(model.getBuyerCompartmentIds()); + } + if (model.wasPropertyExplicitlySet("resellerInformation")) { + this.resellerInformation(model.getResellerInformation()); + } + if (model.wasPropertyExplicitlySet("isvInformation")) { + this.isvInformation(model.getIsvInformation()); + } + if (model.wasPropertyExplicitlySet("buyerAcceptanceDeadline")) { + this.buyerAcceptanceDeadline(model.getBuyerAcceptanceDeadline()); + } + if (model.wasPropertyExplicitlySet("buyerOfferDuration")) { + this.buyerOfferDuration(model.getBuyerOfferDuration()); + } + 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); + } + + /** + * Offer quotes identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Offer quotes identifier. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Compartment identifier of the reseller. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private final String resellerCompartmentId; + + /** + * Compartment identifier of the reseller. + * @return the value + **/ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + + /** + * Compartment identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * Compartment identifier of the ISV. + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private final String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @return the value + **/ + public String getIsvPublisherId() { + return isvPublisherId; + } + + /** + * Description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the offer quote. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * A list of resource bundles associated with an offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private final java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer quote. + * @return the value + **/ + public java.util.List getResourceBundles() { + return resourceBundles; + } + + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private final java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @return the value + **/ + public java.util.List getBuyerCompartmentIds() { + return buyerCompartmentIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private final ResellerInformation resellerInformation; + + public ResellerInformation getResellerInformation() { + return resellerInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private final IsvInformation isvInformation; + + public IsvInformation getIsvInformation() { + return isvInformation; + } + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private final java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getBuyerAcceptanceDeadline() { + return buyerAcceptanceDeadline; + } + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private final String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @return the value + **/ + public String getBuyerOfferDuration() { + return buyerOfferDuration; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("CreateOfferQuoteDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", isvPublisherId=").append(String.valueOf(this.isvPublisherId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", resourceBundles=").append(String.valueOf(this.resourceBundles)); + sb.append(", buyerCompartmentIds=").append(String.valueOf(this.buyerCompartmentIds)); + sb.append(", resellerInformation=").append(String.valueOf(this.resellerInformation)); + sb.append(", isvInformation=").append(String.valueOf(this.isvInformation)); + sb.append(", buyerAcceptanceDeadline=") + .append(String.valueOf(this.buyerAcceptanceDeadline)); + sb.append(", buyerOfferDuration=").append(String.valueOf(this.buyerOfferDuration)); + 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 CreateOfferQuoteDetails)) { + return false; + } + + CreateOfferQuoteDetails other = (CreateOfferQuoteDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.isvPublisherId, other.isvPublisherId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.resourceBundles, other.resourceBundles) + && java.util.Objects.equals(this.buyerCompartmentIds, other.buyerCompartmentIds) + && java.util.Objects.equals(this.resellerInformation, other.resellerInformation) + && java.util.Objects.equals(this.isvInformation, other.isvInformation) + && java.util.Objects.equals( + this.buyerAcceptanceDeadline, other.buyerAcceptanceDeadline) + && java.util.Objects.equals(this.buyerOfferDuration, other.buyerOfferDuration) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvPublisherId == null ? 43 : this.isvPublisherId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.resourceBundles == null ? 43 : this.resourceBundles.hashCode()); + result = + (result * PRIME) + + (this.buyerCompartmentIds == null + ? 43 + : this.buyerCompartmentIds.hashCode()); + result = + (result * PRIME) + + (this.resellerInformation == null + ? 43 + : this.resellerInformation.hashCode()); + result = + (result * PRIME) + + (this.isvInformation == null ? 43 : this.isvInformation.hashCode()); + result = + (result * PRIME) + + (this.buyerAcceptanceDeadline == null + ? 43 + : this.buyerAcceptanceDeadline.hashCode()); + result = + (result * PRIME) + + (this.buyerOfferDuration == null + ? 43 + : this.buyerOfferDuration.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateQuoteAttachmentDetails.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateQuoteAttachmentDetails.java new file mode 100644 index 0000000000..ccffde2311 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CreateQuoteAttachmentDetails.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The details for creating a new offer quote attachment. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateQuoteAttachmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateQuoteAttachmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"fileBase64Encoded", "displayName", "type", "recipient"}) + public CreateQuoteAttachmentDetails( + byte[] fileBase64Encoded, + String displayName, + QuoteAttachment.Type type, + QuoteAttachment.Recipient recipient) { + super(); + this.fileBase64Encoded = fileBase64Encoded; + this.displayName = displayName; + this.type = type; + this.recipient = recipient; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Base64-encoded file to attach to the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileBase64Encoded") + private byte[] fileBase64Encoded; + + /** + * Base64-encoded file to attach to the offer quote. + * @param fileBase64Encoded the value to set + * @return this builder + **/ + public Builder fileBase64Encoded(byte[] fileBase64Encoded) { + this.fileBase64Encoded = fileBase64Encoded; + this.__explicitlySet__.add("fileBase64Encoded"); + return this; + } + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name used to refer to the uploaded data. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private QuoteAttachment.Type type; + + /** + * The type of offer quote attachment. + * @param type the value to set + * @return this builder + **/ + public Builder type(QuoteAttachment.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The recipient of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private QuoteAttachment.Recipient recipient; + + /** + * The recipient of the offer quote attachment. + * @param recipient the value to set + * @return this builder + **/ + public Builder recipient(QuoteAttachment.Recipient recipient) { + this.recipient = recipient; + this.__explicitlySet__.add("recipient"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateQuoteAttachmentDetails build() { + CreateQuoteAttachmentDetails model = + new CreateQuoteAttachmentDetails( + this.fileBase64Encoded, this.displayName, this.type, this.recipient); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateQuoteAttachmentDetails model) { + if (model.wasPropertyExplicitlySet("fileBase64Encoded")) { + this.fileBase64Encoded(model.getFileBase64Encoded()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("recipient")) { + this.recipient(model.getRecipient()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Base64-encoded file to attach to the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileBase64Encoded") + private final byte[] fileBase64Encoded; + + /** + * Base64-encoded file to attach to the offer quote. + * @return the value + **/ + public byte[] getFileBase64Encoded() { + return fileBase64Encoded; + } + + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name used to refer to the uploaded data. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final QuoteAttachment.Type type; + + /** + * The type of offer quote attachment. + * @return the value + **/ + public QuoteAttachment.Type getType() { + return type; + } + + /** + * The recipient of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private final QuoteAttachment.Recipient recipient; + + /** + * The recipient of the offer quote attachment. + * @return the value + **/ + public QuoteAttachment.Recipient getRecipient() { + return recipient; + } + + @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("CreateQuoteAttachmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("fileBase64Encoded=") + .append( + (includeByteArrayContents + ? java.util.Arrays.toString(this.fileBase64Encoded) + : (String.valueOf(this.fileBase64Encoded) + + (this.fileBase64Encoded != null + ? " (byte[" + this.fileBase64Encoded.length + "])" + : "")))); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", recipient=").append(String.valueOf(this.recipient)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateQuoteAttachmentDetails)) { + return false; + } + + CreateQuoteAttachmentDetails other = (CreateQuoteAttachmentDetails) o; + return java.util.Arrays.equals(this.fileBase64Encoded, other.fileBase64Encoded) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.recipient, other.recipient) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + java.util.Arrays.hashCode(this.fileBase64Encoded); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.recipient == null ? 43 : this.recipient.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CustomField.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CustomField.java index eeacc48536..8393a9bc9a 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CustomField.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/CustomField.java @@ -5,7 +5,7 @@ package com.oracle.bmc.marketplaceprivateoffer.model; /** - * A key value pair specified by the seller of the offer + * A key value pair specified by the seller of the offer. *
* 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 @@ -29,13 +29,13 @@ public CustomField(String key, String value) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * the key of the custom field + * The key of the custom field. **/ @com.fasterxml.jackson.annotation.JsonProperty("key") private String key; /** - * the key of the custom field + * The key of the custom field. * @param key the value to set * @return this builder **/ @@ -45,13 +45,13 @@ public Builder key(String key) { return this; } /** - * the value of the custom field + * The value of the custom field. **/ @com.fasterxml.jackson.annotation.JsonProperty("value") private String value; /** - * the value of the custom field + * The value of the custom field. * @param value the value to set * @return this builder **/ @@ -96,13 +96,13 @@ public Builder toBuilder() { } /** - * the key of the custom field + * The key of the custom field. **/ @com.fasterxml.jackson.annotation.JsonProperty("key") private final String key; /** - * the key of the custom field + * The key of the custom field. * @return the value **/ public String getKey() { @@ -110,13 +110,13 @@ public String getKey() { } /** - * the value of the custom field + * The value of the custom field. **/ @com.fasterxml.jackson.annotation.JsonProperty("value") private final String value; /** - * the value of the custom field + * The value of the custom field. * @return the value **/ public String getValue() { diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/IsvInformation.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/IsvInformation.java new file mode 100644 index 0000000000..93bc27a194 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/IsvInformation.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The information related to the ISV of an offer quote. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = IsvInformation.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IsvInformation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"primaryContact", "additionalContacts"}) + public IsvInformation(Contact primaryContact, java.util.List additionalContacts) { + super(); + this.primaryContact = primaryContact; + this.additionalContacts = additionalContacts; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("primaryContact") + private Contact primaryContact; + + public Builder primaryContact(Contact primaryContact) { + this.primaryContact = primaryContact; + this.__explicitlySet__.add("primaryContact"); + return this; + } + /** + * The additional contacts associated with the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalContacts") + private java.util.List additionalContacts; + + /** + * The additional contacts associated with the ISV. + * @param additionalContacts the value to set + * @return this builder + **/ + public Builder additionalContacts(java.util.List additionalContacts) { + this.additionalContacts = additionalContacts; + this.__explicitlySet__.add("additionalContacts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IsvInformation build() { + IsvInformation model = new IsvInformation(this.primaryContact, this.additionalContacts); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IsvInformation model) { + if (model.wasPropertyExplicitlySet("primaryContact")) { + this.primaryContact(model.getPrimaryContact()); + } + if (model.wasPropertyExplicitlySet("additionalContacts")) { + this.additionalContacts(model.getAdditionalContacts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("primaryContact") + private final Contact primaryContact; + + public Contact getPrimaryContact() { + return primaryContact; + } + + /** + * The additional contacts associated with the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalContacts") + private final java.util.List additionalContacts; + + /** + * The additional contacts associated with the ISV. + * @return the value + **/ + public java.util.List getAdditionalContacts() { + return additionalContacts; + } + + @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("IsvInformation("); + sb.append("super=").append(super.toString()); + sb.append("primaryContact=").append(String.valueOf(this.primaryContact)); + sb.append(", additionalContacts=").append(String.valueOf(this.additionalContacts)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IsvInformation)) { + return false; + } + + IsvInformation other = (IsvInformation) o; + return java.util.Objects.equals(this.primaryContact, other.primaryContact) + && java.util.Objects.equals(this.additionalContacts, other.additionalContacts) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.primaryContact == null ? 43 : this.primaryContact.hashCode()); + result = + (result * PRIME) + + (this.additionalContacts == null + ? 43 + : this.additionalContacts.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Offer.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Offer.java index d64d57c3f5..da9bf88588 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Offer.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Offer.java @@ -40,8 +40,10 @@ public final class Offer extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "buyerInformation", "sellerInformation", "resourceBundles", + "offerType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public Offer( String id, @@ -64,8 +66,10 @@ public Offer( BuyerInformation buyerInformation, SellerInformation sellerInformation, java.util.List resourceBundles, + OfferType offerType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -87,8 +91,10 @@ public Offer( this.buyerInformation = buyerInformation; this.sellerInformation = sellerInformation; this.resourceBundles = resourceBundles; + this.offerType = offerType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -385,6 +391,22 @@ public Builder resourceBundles(java.util.List resourceBundles) { this.__explicitlySet__.add("resourceBundles"); return this; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private OfferType offerType; + + /** + * The type of the offer. + * @param offerType the value to set + * @return this builder + **/ + public Builder offerType(OfferType offerType) { + this.offerType = offerType; + this.__explicitlySet__.add("offerType"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -426,6 +448,26 @@ public Builder 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(); @@ -453,8 +495,10 @@ public Offer build() { this.buyerInformation, this.sellerInformation, this.resourceBundles, + this.offerType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -523,12 +567,18 @@ public Builder copy(Offer model) { if (model.wasPropertyExplicitlySet("resourceBundles")) { this.resourceBundles(model.getResourceBundles()); } + if (model.wasPropertyExplicitlySet("offerType")) { + this.offerType(model.getOfferType()); + } 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; } } @@ -903,6 +953,68 @@ public java.util.List getResourceBundles() { return resourceBundles; } + /** + * The type of the offer. + **/ + public enum OfferType { + Direct("DIRECT"), + MultiParty("MULTI_PARTY"), + + /** + * 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(OfferType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OfferType v : OfferType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OfferType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OfferType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OfferType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private final OfferType offerType; + + /** + * The type of the offer. + * @return the value + **/ + public OfferType getOfferType() { + return offerType; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -939,6 +1051,24 @@ 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); @@ -973,8 +1103,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", buyerInformation=").append(String.valueOf(this.buyerInformation)); sb.append(", sellerInformation=").append(String.valueOf(this.sellerInformation)); sb.append(", resourceBundles=").append(String.valueOf(this.resourceBundles)); + sb.append(", offerType=").append(String.valueOf(this.offerType)); 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(); } @@ -1009,8 +1141,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.buyerInformation, other.buyerInformation) && java.util.Objects.equals(this.sellerInformation, other.sellerInformation) && java.util.Objects.equals(this.resourceBundles, other.resourceBundles) + && java.util.Objects.equals(this.offerType, other.offerType) && 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); } @@ -1060,8 +1194,10 @@ public int hashCode() { result = (result * PRIME) + (this.resourceBundles == null ? 43 : this.resourceBundles.hashCode()); + result = (result * PRIME) + (this.offerType == null ? 43 : this.offerType.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferInternalDetail.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferInternalDetail.java index 60005e3cf9..5ff4425501 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferInternalDetail.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferInternalDetail.java @@ -21,11 +21,15 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class OfferInternalDetail extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"customFields", "internalNotes"}) - public OfferInternalDetail(java.util.List customFields, String internalNotes) { + @java.beans.ConstructorProperties({"customFields", "internalNotes", "offerQuoteIds"}) + public OfferInternalDetail( + java.util.List customFields, + String internalNotes, + java.util.List offerQuoteIds) { super(); this.customFields = customFields; this.internalNotes = internalNotes; + this.offerQuoteIds = offerQuoteIds; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -62,13 +66,30 @@ public Builder internalNotes(String internalNotes) { this.__explicitlySet__.add("internalNotes"); return this; } + /** + * A list of associated offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteIds") + private java.util.List offerQuoteIds; + + /** + * A list of associated offer quotes. + * @param offerQuoteIds the value to set + * @return this builder + **/ + public Builder offerQuoteIds(java.util.List offerQuoteIds) { + this.offerQuoteIds = offerQuoteIds; + this.__explicitlySet__.add("offerQuoteIds"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public OfferInternalDetail build() { OfferInternalDetail model = - new OfferInternalDetail(this.customFields, this.internalNotes); + new OfferInternalDetail( + this.customFields, this.internalNotes, this.offerQuoteIds); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -83,6 +104,9 @@ public Builder copy(OfferInternalDetail model) { if (model.wasPropertyExplicitlySet("internalNotes")) { this.internalNotes(model.getInternalNotes()); } + if (model.wasPropertyExplicitlySet("offerQuoteIds")) { + this.offerQuoteIds(model.getOfferQuoteIds()); + } return this; } } @@ -126,6 +150,20 @@ public String getInternalNotes() { return internalNotes; } + /** + * A list of associated offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteIds") + private final java.util.List offerQuoteIds; + + /** + * A list of associated offer quotes. + * @return the value + **/ + public java.util.List getOfferQuoteIds() { + return offerQuoteIds; + } + @Override public String toString() { return this.toString(true); @@ -142,6 +180,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("customFields=").append(String.valueOf(this.customFields)); sb.append(", internalNotes=").append(String.valueOf(this.internalNotes)); + sb.append(", offerQuoteIds=").append(String.valueOf(this.offerQuoteIds)); sb.append(")"); return sb.toString(); } @@ -158,6 +197,7 @@ public boolean equals(Object o) { OfferInternalDetail other = (OfferInternalDetail) o; return java.util.Objects.equals(this.customFields, other.customFields) && java.util.Objects.equals(this.internalNotes, other.internalNotes) + && java.util.Objects.equals(this.offerQuoteIds, other.offerQuoteIds) && super.equals(other); } @@ -169,6 +209,9 @@ public int hashCode() { result = (result * PRIME) + (this.internalNotes == null ? 43 : this.internalNotes.hashCode()); + result = + (result * PRIME) + + (this.offerQuoteIds == null ? 43 : this.offerQuoteIds.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuote.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuote.java new file mode 100644 index 0000000000..63bf2ecc47 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuote.java @@ -0,0 +1,1159 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The model for the offer quote details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OfferQuote.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OfferQuote extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "resellerCompartmentId", + "isvCompartmentId", + "isvPublisherId", + "resellerPublisherDisplayName", + "isvPublisherDisplayName", + "buyerCompartmentIds", + "description", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "offerQuoteStatus", + "resellerInformation", + "isvInformation", + "pricing", + "resourceBundles", + "buyerAcceptanceDeadline", + "buyerOfferDuration", + "freeformTags", + "definedTags", + "systemTags" + }) + public OfferQuote( + String id, + String displayName, + String resellerCompartmentId, + String isvCompartmentId, + String isvPublisherId, + String resellerPublisherDisplayName, + String isvPublisherDisplayName, + java.util.List buyerCompartmentIds, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + OfferQuoteStatus offerQuoteStatus, + ResellerInformation resellerInformation, + IsvInformation isvInformation, + Pricing pricing, + java.util.List resourceBundles, + java.util.Date buyerAcceptanceDeadline, + String buyerOfferDuration, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.resellerCompartmentId = resellerCompartmentId; + this.isvCompartmentId = isvCompartmentId; + this.isvPublisherId = isvPublisherId; + this.resellerPublisherDisplayName = resellerPublisherDisplayName; + this.isvPublisherDisplayName = isvPublisherDisplayName; + this.buyerCompartmentIds = buyerCompartmentIds; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.offerQuoteStatus = offerQuoteStatus; + this.resellerInformation = resellerInformation; + this.isvInformation = isvInformation; + this.pricing = pricing; + this.resourceBundles = resourceBundles; + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.buyerOfferDuration = buyerOfferDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Offer quote identifier, can be renamed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Offer quote identifier, can be renamed. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * OCID of the reseller tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private String resellerCompartmentId; + + /** + * OCID of the reseller tenancy. + * @param resellerCompartmentId the value to set + * @return this builder + **/ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + this.__explicitlySet__.add("resellerCompartmentId"); + return this; + } + /** + * OCID of the ISV tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * OCID of the ISV tenancy. + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @param isvPublisherId the value to set + * @return this builder + **/ + public Builder isvPublisherId(String isvPublisherId) { + this.isvPublisherId = isvPublisherId; + this.__explicitlySet__.add("isvPublisherId"); + return this; + } + /** + * Display name of the reseller publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerPublisherDisplayName") + private String resellerPublisherDisplayName; + + /** + * Display name of the reseller publisher. + * @param resellerPublisherDisplayName the value to set + * @return this builder + **/ + public Builder resellerPublisherDisplayName(String resellerPublisherDisplayName) { + this.resellerPublisherDisplayName = resellerPublisherDisplayName; + this.__explicitlySet__.add("resellerPublisherDisplayName"); + return this; + } + /** + * Display name of the ISV publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherDisplayName") + private String isvPublisherDisplayName; + + /** + * Display name of the ISV publisher. + * @param isvPublisherDisplayName the value to set + * @return this builder + **/ + public Builder isvPublisherDisplayName(String isvPublisherDisplayName) { + this.isvPublisherDisplayName = isvPublisherDisplayName; + this.__explicitlySet__.add("isvPublisherDisplayName"); + return this; + } + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @param buyerCompartmentIds the value to set + * @return this builder + **/ + public Builder buyerCompartmentIds(java.util.List buyerCompartmentIds) { + this.buyerCompartmentIds = buyerCompartmentIds; + this.__explicitlySet__.add("buyerCompartmentIds"); + return this; + } + /** + * The description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the offer quote. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + * @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 time the offer quote was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + * @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 the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the offer quote. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteStatus") + private OfferQuoteStatus offerQuoteStatus; + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + * @param offerQuoteStatus the value to set + * @return this builder + **/ + public Builder offerQuoteStatus(OfferQuoteStatus offerQuoteStatus) { + this.offerQuoteStatus = offerQuoteStatus; + this.__explicitlySet__.add("offerQuoteStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private ResellerInformation resellerInformation; + + public Builder resellerInformation(ResellerInformation resellerInformation) { + this.resellerInformation = resellerInformation; + this.__explicitlySet__.add("resellerInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private IsvInformation isvInformation; + + public Builder isvInformation(IsvInformation isvInformation) { + this.isvInformation = isvInformation; + this.__explicitlySet__.add("isvInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private Pricing pricing; + + public Builder pricing(Pricing pricing) { + this.pricing = pricing; + this.__explicitlySet__.add("pricing"); + return this; + } + /** + * A list of resource bundles associated with an offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer quote. + * @param resourceBundles the value to set + * @return this builder + **/ + public Builder resourceBundles(java.util.List resourceBundles) { + this.resourceBundles = resourceBundles; + this.__explicitlySet__.add("resourceBundles"); + return this; + } + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @param buyerAcceptanceDeadline the value to set + * @return this builder + **/ + public Builder buyerAcceptanceDeadline(java.util.Date buyerAcceptanceDeadline) { + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.__explicitlySet__.add("buyerAcceptanceDeadline"); + return this; + } + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @param buyerOfferDuration the value to set + * @return this builder + **/ + public Builder buyerOfferDuration(String buyerOfferDuration) { + this.buyerOfferDuration = buyerOfferDuration; + this.__explicitlySet__.add("buyerOfferDuration"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 OfferQuote build() { + OfferQuote model = + new OfferQuote( + this.id, + this.displayName, + this.resellerCompartmentId, + this.isvCompartmentId, + this.isvPublisherId, + this.resellerPublisherDisplayName, + this.isvPublisherDisplayName, + this.buyerCompartmentIds, + this.description, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.offerQuoteStatus, + this.resellerInformation, + this.isvInformation, + this.pricing, + this.resourceBundles, + this.buyerAcceptanceDeadline, + this.buyerOfferDuration, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OfferQuote model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("resellerCompartmentId")) { + this.resellerCompartmentId(model.getResellerCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvPublisherId")) { + this.isvPublisherId(model.getIsvPublisherId()); + } + if (model.wasPropertyExplicitlySet("resellerPublisherDisplayName")) { + this.resellerPublisherDisplayName(model.getResellerPublisherDisplayName()); + } + if (model.wasPropertyExplicitlySet("isvPublisherDisplayName")) { + this.isvPublisherDisplayName(model.getIsvPublisherDisplayName()); + } + if (model.wasPropertyExplicitlySet("buyerCompartmentIds")) { + this.buyerCompartmentIds(model.getBuyerCompartmentIds()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + 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("offerQuoteStatus")) { + this.offerQuoteStatus(model.getOfferQuoteStatus()); + } + if (model.wasPropertyExplicitlySet("resellerInformation")) { + this.resellerInformation(model.getResellerInformation()); + } + if (model.wasPropertyExplicitlySet("isvInformation")) { + this.isvInformation(model.getIsvInformation()); + } + if (model.wasPropertyExplicitlySet("pricing")) { + this.pricing(model.getPricing()); + } + if (model.wasPropertyExplicitlySet("resourceBundles")) { + this.resourceBundles(model.getResourceBundles()); + } + if (model.wasPropertyExplicitlySet("buyerAcceptanceDeadline")) { + this.buyerAcceptanceDeadline(model.getBuyerAcceptanceDeadline()); + } + if (model.wasPropertyExplicitlySet("buyerOfferDuration")) { + this.buyerOfferDuration(model.getBuyerOfferDuration()); + } + 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); + } + + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Offer quote identifier, can be renamed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Offer quote identifier, can be renamed. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * OCID of the reseller tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private final String resellerCompartmentId; + + /** + * OCID of the reseller tenancy. + * @return the value + **/ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + + /** + * OCID of the ISV tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * OCID of the ISV tenancy. + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private final String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @return the value + **/ + public String getIsvPublisherId() { + return isvPublisherId; + } + + /** + * Display name of the reseller publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerPublisherDisplayName") + private final String resellerPublisherDisplayName; + + /** + * Display name of the reseller publisher. + * @return the value + **/ + public String getResellerPublisherDisplayName() { + return resellerPublisherDisplayName; + } + + /** + * Display name of the ISV publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherDisplayName") + private final String isvPublisherDisplayName; + + /** + * Display name of the ISV publisher. + * @return the value + **/ + public String getIsvPublisherDisplayName() { + return isvPublisherDisplayName; + } + + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private final java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @return the value + **/ + public java.util.List getBuyerCompartmentIds() { + return buyerCompartmentIds; + } + + /** + * The description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the offer quote. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the offer quote. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + 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 the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the offer quote. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + **/ + public enum OfferQuoteStatus { + Draft("DRAFT"), + PendingIsv("PENDING_ISV"), + PendingIsvUpdate("PENDING_ISV_UPDATE"), + PendingReseller("PENDING_RESELLER"), + ResellerAccepted("RESELLER_ACCEPTED"), + BuyerAccepted("BUYER_ACCEPTED"), + Active("ACTIVE"), + Ended("ENDED"), + Expired("EXPIRED"), + FailedSend("FAILED_SEND"), + FailedAccept("FAILED_ACCEPT"), + FailedRespond("FAILED_RESPOND"), + + /** + * 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(OfferQuoteStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OfferQuoteStatus v : OfferQuoteStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OfferQuoteStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OfferQuoteStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OfferQuoteStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteStatus") + private final OfferQuoteStatus offerQuoteStatus; + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + * @return the value + **/ + public OfferQuoteStatus getOfferQuoteStatus() { + return offerQuoteStatus; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private final ResellerInformation resellerInformation; + + public ResellerInformation getResellerInformation() { + return resellerInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private final IsvInformation isvInformation; + + public IsvInformation getIsvInformation() { + return isvInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private final Pricing pricing; + + public Pricing getPricing() { + return pricing; + } + + /** + * A list of resource bundles associated with an offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private final java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer quote. + * @return the value + **/ + public java.util.List getResourceBundles() { + return resourceBundles; + } + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private final java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getBuyerAcceptanceDeadline() { + return buyerAcceptanceDeadline; + } + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private final String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @return the value + **/ + public String getBuyerOfferDuration() { + return buyerOfferDuration; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("OfferQuote("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", isvPublisherId=").append(String.valueOf(this.isvPublisherId)); + sb.append(", resellerPublisherDisplayName=") + .append(String.valueOf(this.resellerPublisherDisplayName)); + sb.append(", isvPublisherDisplayName=") + .append(String.valueOf(this.isvPublisherDisplayName)); + sb.append(", buyerCompartmentIds=").append(String.valueOf(this.buyerCompartmentIds)); + sb.append(", description=").append(String.valueOf(this.description)); + 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(", offerQuoteStatus=").append(String.valueOf(this.offerQuoteStatus)); + sb.append(", resellerInformation=").append(String.valueOf(this.resellerInformation)); + sb.append(", isvInformation=").append(String.valueOf(this.isvInformation)); + sb.append(", pricing=").append(String.valueOf(this.pricing)); + sb.append(", resourceBundles=").append(String.valueOf(this.resourceBundles)); + sb.append(", buyerAcceptanceDeadline=") + .append(String.valueOf(this.buyerAcceptanceDeadline)); + sb.append(", buyerOfferDuration=").append(String.valueOf(this.buyerOfferDuration)); + 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 OfferQuote)) { + return false; + } + + OfferQuote other = (OfferQuote) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.isvPublisherId, other.isvPublisherId) + && java.util.Objects.equals( + this.resellerPublisherDisplayName, other.resellerPublisherDisplayName) + && java.util.Objects.equals( + this.isvPublisherDisplayName, other.isvPublisherDisplayName) + && java.util.Objects.equals(this.buyerCompartmentIds, other.buyerCompartmentIds) + && java.util.Objects.equals(this.description, other.description) + && 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.offerQuoteStatus, other.offerQuoteStatus) + && java.util.Objects.equals(this.resellerInformation, other.resellerInformation) + && java.util.Objects.equals(this.isvInformation, other.isvInformation) + && java.util.Objects.equals(this.pricing, other.pricing) + && java.util.Objects.equals(this.resourceBundles, other.resourceBundles) + && java.util.Objects.equals( + this.buyerAcceptanceDeadline, other.buyerAcceptanceDeadline) + && java.util.Objects.equals(this.buyerOfferDuration, other.buyerOfferDuration) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvPublisherId == null ? 43 : this.isvPublisherId.hashCode()); + result = + (result * PRIME) + + (this.resellerPublisherDisplayName == null + ? 43 + : this.resellerPublisherDisplayName.hashCode()); + result = + (result * PRIME) + + (this.isvPublisherDisplayName == null + ? 43 + : this.isvPublisherDisplayName.hashCode()); + result = + (result * PRIME) + + (this.buyerCompartmentIds == null + ? 43 + : this.buyerCompartmentIds.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.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.offerQuoteStatus == null ? 43 : this.offerQuoteStatus.hashCode()); + result = + (result * PRIME) + + (this.resellerInformation == null + ? 43 + : this.resellerInformation.hashCode()); + result = + (result * PRIME) + + (this.isvInformation == null ? 43 : this.isvInformation.hashCode()); + result = (result * PRIME) + (this.pricing == null ? 43 : this.pricing.hashCode()); + result = + (result * PRIME) + + (this.resourceBundles == null ? 43 : this.resourceBundles.hashCode()); + result = + (result * PRIME) + + (this.buyerAcceptanceDeadline == null + ? 43 + : this.buyerAcceptanceDeadline.hashCode()); + result = + (result * PRIME) + + (this.buyerOfferDuration == null + ? 43 + : this.buyerOfferDuration.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteCollection.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteCollection.java new file mode 100644 index 0000000000..ced7868e79 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Results of offer quote summaries. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OfferQuoteCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OfferQuoteCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public OfferQuoteCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of offer quotes. + * @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 OfferQuoteCollection build() { + OfferQuoteCollection model = new OfferQuoteCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OfferQuoteCollection 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 offer quotes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of offer quotes. + * @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("OfferQuoteCollection("); + 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 OfferQuoteCollection)) { + return false; + } + + OfferQuoteCollection other = (OfferQuoteCollection) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteInternalDetail.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteInternalDetail.java new file mode 100644 index 0000000000..bef06c71ee --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteInternalDetail.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The internal details of an offer quote. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OfferQuoteInternalDetail.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OfferQuoteInternalDetail + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"offerIds"}) + public OfferQuoteInternalDetail(java.util.List offerIds) { + super(); + this.offerIds = offerIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of associated offers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerIds") + private java.util.List offerIds; + + /** + * A list of associated offers. + * @param offerIds the value to set + * @return this builder + **/ + public Builder offerIds(java.util.List offerIds) { + this.offerIds = offerIds; + this.__explicitlySet__.add("offerIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OfferQuoteInternalDetail build() { + OfferQuoteInternalDetail model = new OfferQuoteInternalDetail(this.offerIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OfferQuoteInternalDetail model) { + if (model.wasPropertyExplicitlySet("offerIds")) { + this.offerIds(model.getOfferIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of associated offers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerIds") + private final java.util.List offerIds; + + /** + * A list of associated offers. + * @return the value + **/ + public java.util.List getOfferIds() { + return offerIds; + } + + @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("OfferQuoteInternalDetail("); + sb.append("super=").append(super.toString()); + sb.append("offerIds=").append(String.valueOf(this.offerIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OfferQuoteInternalDetail)) { + return false; + } + + OfferQuoteInternalDetail other = (OfferQuoteInternalDetail) o; + return java.util.Objects.equals(this.offerIds, other.offerIds) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.offerIds == null ? 43 : this.offerIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteSummary.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteSummary.java new file mode 100644 index 0000000000..3dc26e547e --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferQuoteSummary.java @@ -0,0 +1,927 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Summary of the offer quotes. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OfferQuoteSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OfferQuoteSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "resellerCompartmentId", + "isvCompartmentId", + "buyerCompartmentIds", + "resellerPublisherDisplayName", + "isvPublisherDisplayName", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "offerQuoteStatus", + "resellerInformation", + "isvInformation", + "pricing", + "buyerAcceptanceDeadline", + "buyerOfferDuration", + "freeformTags", + "definedTags", + "systemTags" + }) + public OfferQuoteSummary( + String id, + String displayName, + String resellerCompartmentId, + String isvCompartmentId, + java.util.List buyerCompartmentIds, + String resellerPublisherDisplayName, + String isvPublisherDisplayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + OfferQuote.LifecycleState lifecycleState, + String lifecycleDetails, + OfferQuote.OfferQuoteStatus offerQuoteStatus, + ResellerInformation resellerInformation, + IsvInformation isvInformation, + Pricing pricing, + java.util.Date buyerAcceptanceDeadline, + String buyerOfferDuration, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.resellerCompartmentId = resellerCompartmentId; + this.isvCompartmentId = isvCompartmentId; + this.buyerCompartmentIds = buyerCompartmentIds; + this.resellerPublisherDisplayName = resellerPublisherDisplayName; + this.isvPublisherDisplayName = isvPublisherDisplayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.offerQuoteStatus = offerQuoteStatus; + this.resellerInformation = resellerInformation; + this.isvInformation = isvInformation; + this.pricing = pricing; + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.buyerOfferDuration = buyerOfferDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Offer quote identifier, can be renamed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Offer quote identifier, can be renamed. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * OCID of the reseller tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private String resellerCompartmentId; + + /** + * OCID of the reseller tenancy. + * @param resellerCompartmentId the value to set + * @return this builder + **/ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + this.__explicitlySet__.add("resellerCompartmentId"); + return this; + } + /** + * OCID of the ISV tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * OCID of the ISV tenancy. + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @param buyerCompartmentIds the value to set + * @return this builder + **/ + public Builder buyerCompartmentIds(java.util.List buyerCompartmentIds) { + this.buyerCompartmentIds = buyerCompartmentIds; + this.__explicitlySet__.add("buyerCompartmentIds"); + return this; + } + /** + * Display name of the reseller publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerPublisherDisplayName") + private String resellerPublisherDisplayName; + + /** + * Display name of the reseller publisher. + * @param resellerPublisherDisplayName the value to set + * @return this builder + **/ + public Builder resellerPublisherDisplayName(String resellerPublisherDisplayName) { + this.resellerPublisherDisplayName = resellerPublisherDisplayName; + this.__explicitlySet__.add("resellerPublisherDisplayName"); + return this; + } + /** + * Display name of the ISV publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherDisplayName") + private String isvPublisherDisplayName; + + /** + * Display name of the ISV publisher. + * @param isvPublisherDisplayName the value to set + * @return this builder + **/ + public Builder isvPublisherDisplayName(String isvPublisherDisplayName) { + this.isvPublisherDisplayName = isvPublisherDisplayName; + this.__explicitlySet__.add("isvPublisherDisplayName"); + return this; + } + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + * @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 time the offer quote was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + * @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 the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private OfferQuote.LifecycleState lifecycleState; + + /** + * The current state of the offer quote. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(OfferQuote.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteStatus") + private OfferQuote.OfferQuoteStatus offerQuoteStatus; + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + * @param offerQuoteStatus the value to set + * @return this builder + **/ + public Builder offerQuoteStatus(OfferQuote.OfferQuoteStatus offerQuoteStatus) { + this.offerQuoteStatus = offerQuoteStatus; + this.__explicitlySet__.add("offerQuoteStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private ResellerInformation resellerInformation; + + public Builder resellerInformation(ResellerInformation resellerInformation) { + this.resellerInformation = resellerInformation; + this.__explicitlySet__.add("resellerInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private IsvInformation isvInformation; + + public Builder isvInformation(IsvInformation isvInformation) { + this.isvInformation = isvInformation; + this.__explicitlySet__.add("isvInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private Pricing pricing; + + public Builder pricing(Pricing pricing) { + this.pricing = pricing; + this.__explicitlySet__.add("pricing"); + return this; + } + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @param buyerAcceptanceDeadline the value to set + * @return this builder + **/ + public Builder buyerAcceptanceDeadline(java.util.Date buyerAcceptanceDeadline) { + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.__explicitlySet__.add("buyerAcceptanceDeadline"); + return this; + } + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @param buyerOfferDuration the value to set + * @return this builder + **/ + public Builder buyerOfferDuration(String buyerOfferDuration) { + this.buyerOfferDuration = buyerOfferDuration; + this.__explicitlySet__.add("buyerOfferDuration"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 OfferQuoteSummary build() { + OfferQuoteSummary model = + new OfferQuoteSummary( + this.id, + this.displayName, + this.resellerCompartmentId, + this.isvCompartmentId, + this.buyerCompartmentIds, + this.resellerPublisherDisplayName, + this.isvPublisherDisplayName, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.offerQuoteStatus, + this.resellerInformation, + this.isvInformation, + this.pricing, + this.buyerAcceptanceDeadline, + this.buyerOfferDuration, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OfferQuoteSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("resellerCompartmentId")) { + this.resellerCompartmentId(model.getResellerCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("buyerCompartmentIds")) { + this.buyerCompartmentIds(model.getBuyerCompartmentIds()); + } + if (model.wasPropertyExplicitlySet("resellerPublisherDisplayName")) { + this.resellerPublisherDisplayName(model.getResellerPublisherDisplayName()); + } + if (model.wasPropertyExplicitlySet("isvPublisherDisplayName")) { + this.isvPublisherDisplayName(model.getIsvPublisherDisplayName()); + } + 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("offerQuoteStatus")) { + this.offerQuoteStatus(model.getOfferQuoteStatus()); + } + if (model.wasPropertyExplicitlySet("resellerInformation")) { + this.resellerInformation(model.getResellerInformation()); + } + if (model.wasPropertyExplicitlySet("isvInformation")) { + this.isvInformation(model.getIsvInformation()); + } + if (model.wasPropertyExplicitlySet("pricing")) { + this.pricing(model.getPricing()); + } + if (model.wasPropertyExplicitlySet("buyerAcceptanceDeadline")) { + this.buyerAcceptanceDeadline(model.getBuyerAcceptanceDeadline()); + } + if (model.wasPropertyExplicitlySet("buyerOfferDuration")) { + this.buyerOfferDuration(model.getBuyerOfferDuration()); + } + 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); + } + + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Offer quote identifier, can be renamed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Offer quote identifier, can be renamed. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * OCID of the reseller tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private final String resellerCompartmentId; + + /** + * OCID of the reseller tenancy. + * @return the value + **/ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + + /** + * OCID of the ISV tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * OCID of the ISV tenancy. + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private final java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @return the value + **/ + public java.util.List getBuyerCompartmentIds() { + return buyerCompartmentIds; + } + + /** + * Display name of the reseller publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerPublisherDisplayName") + private final String resellerPublisherDisplayName; + + /** + * Display name of the reseller publisher. + * @return the value + **/ + public String getResellerPublisherDisplayName() { + return resellerPublisherDisplayName; + } + + /** + * Display name of the ISV publisher. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherDisplayName") + private final String isvPublisherDisplayName; + + /** + * Display name of the ISV publisher. + * @return the value + **/ + public String getIsvPublisherDisplayName() { + return isvPublisherDisplayName; + } + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the offer quote was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the offer quote was updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final OfferQuote.LifecycleState lifecycleState; + + /** + * The current state of the offer quote. + * @return the value + **/ + public OfferQuote.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote. For example, if the offer quote is in a failed state this message can include specific validation errors. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteStatus") + private final OfferQuote.OfferQuoteStatus offerQuoteStatus; + + /** + * The human readable representation of where the offer quote is at in its contract lifecycle. + * @return the value + **/ + public OfferQuote.OfferQuoteStatus getOfferQuoteStatus() { + return offerQuoteStatus; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private final ResellerInformation resellerInformation; + + public ResellerInformation getResellerInformation() { + return resellerInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private final IsvInformation isvInformation; + + public IsvInformation getIsvInformation() { + return isvInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private final Pricing pricing; + + public Pricing getPricing() { + return pricing; + } + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private final java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getBuyerAcceptanceDeadline() { + return buyerAcceptanceDeadline; + } + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private final String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @return the value + **/ + public String getBuyerOfferDuration() { + return buyerOfferDuration; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("OfferQuoteSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", buyerCompartmentIds=").append(String.valueOf(this.buyerCompartmentIds)); + sb.append(", resellerPublisherDisplayName=") + .append(String.valueOf(this.resellerPublisherDisplayName)); + sb.append(", isvPublisherDisplayName=") + .append(String.valueOf(this.isvPublisherDisplayName)); + 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(", offerQuoteStatus=").append(String.valueOf(this.offerQuoteStatus)); + sb.append(", resellerInformation=").append(String.valueOf(this.resellerInformation)); + sb.append(", isvInformation=").append(String.valueOf(this.isvInformation)); + sb.append(", pricing=").append(String.valueOf(this.pricing)); + sb.append(", buyerAcceptanceDeadline=") + .append(String.valueOf(this.buyerAcceptanceDeadline)); + sb.append(", buyerOfferDuration=").append(String.valueOf(this.buyerOfferDuration)); + 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 OfferQuoteSummary)) { + return false; + } + + OfferQuoteSummary other = (OfferQuoteSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.buyerCompartmentIds, other.buyerCompartmentIds) + && java.util.Objects.equals( + this.resellerPublisherDisplayName, other.resellerPublisherDisplayName) + && java.util.Objects.equals( + this.isvPublisherDisplayName, other.isvPublisherDisplayName) + && 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.offerQuoteStatus, other.offerQuoteStatus) + && java.util.Objects.equals(this.resellerInformation, other.resellerInformation) + && java.util.Objects.equals(this.isvInformation, other.isvInformation) + && java.util.Objects.equals(this.pricing, other.pricing) + && java.util.Objects.equals( + this.buyerAcceptanceDeadline, other.buyerAcceptanceDeadline) + && java.util.Objects.equals(this.buyerOfferDuration, other.buyerOfferDuration) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.buyerCompartmentIds == null + ? 43 + : this.buyerCompartmentIds.hashCode()); + result = + (result * PRIME) + + (this.resellerPublisherDisplayName == null + ? 43 + : this.resellerPublisherDisplayName.hashCode()); + result = + (result * PRIME) + + (this.isvPublisherDisplayName == null + ? 43 + : this.isvPublisherDisplayName.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.offerQuoteStatus == null ? 43 : this.offerQuoteStatus.hashCode()); + result = + (result * PRIME) + + (this.resellerInformation == null + ? 43 + : this.resellerInformation.hashCode()); + result = + (result * PRIME) + + (this.isvInformation == null ? 43 : this.isvInformation.hashCode()); + result = (result * PRIME) + (this.pricing == null ? 43 : this.pricing.hashCode()); + result = + (result * PRIME) + + (this.buyerAcceptanceDeadline == null + ? 43 + : this.buyerAcceptanceDeadline.hashCode()); + result = + (result * PRIME) + + (this.buyerOfferDuration == null + ? 43 + : this.buyerOfferDuration.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferSummary.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferSummary.java index 71dda2945f..9cbc8d7103 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferSummary.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/OfferSummary.java @@ -36,8 +36,10 @@ public final class OfferSummary extends com.oracle.bmc.http.internal.ExplicitlyS "buyerInformation", "sellerInformation", "pricing", + "offerType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public OfferSummary( String id, @@ -56,8 +58,10 @@ public OfferSummary( BuyerInformation buyerInformation, SellerInformation sellerInformation, Pricing pricing, + Offer.OfferType offerType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -75,8 +79,10 @@ public OfferSummary( this.buyerInformation = buyerInformation; this.sellerInformation = sellerInformation; this.pricing = pricing; + this.offerType = offerType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -316,6 +322,22 @@ public Builder pricing(Pricing pricing) { this.__explicitlySet__.add("pricing"); return this; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private Offer.OfferType offerType; + + /** + * The type of the offer. + * @param offerType the value to set + * @return this builder + **/ + public Builder offerType(Offer.OfferType offerType) { + this.offerType = offerType; + this.__explicitlySet__.add("offerType"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -357,6 +379,26 @@ public Builder 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(); @@ -380,8 +422,10 @@ public OfferSummary build() { this.buyerInformation, this.sellerInformation, this.pricing, + this.offerType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -438,12 +482,18 @@ public Builder copy(OfferSummary model) { if (model.wasPropertyExplicitlySet("pricing")) { this.pricing(model.getPricing()); } + if (model.wasPropertyExplicitlySet("offerType")) { + this.offerType(model.getOfferType()); + } 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; } } @@ -662,6 +712,20 @@ public Pricing getPricing() { return pricing; } + /** + * The type of the offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerType") + private final Offer.OfferType offerType; + + /** + * The type of the offer. + * @return the value + **/ + public Offer.OfferType getOfferType() { + return offerType; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -698,6 +762,24 @@ 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); @@ -728,8 +810,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", buyerInformation=").append(String.valueOf(this.buyerInformation)); sb.append(", sellerInformation=").append(String.valueOf(this.sellerInformation)); sb.append(", pricing=").append(String.valueOf(this.pricing)); + sb.append(", offerType=").append(String.valueOf(this.offerType)); 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(); } @@ -760,8 +844,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.buyerInformation, other.buyerInformation) && java.util.Objects.equals(this.sellerInformation, other.sellerInformation) && java.util.Objects.equals(this.pricing, other.pricing) + && java.util.Objects.equals(this.offerType, other.offerType) && 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); } @@ -803,8 +889,10 @@ public int hashCode() { (result * PRIME) + (this.sellerInformation == null ? 43 : this.sellerInformation.hashCode()); result = (result * PRIME) + (this.pricing == null ? 43 : this.pricing.hashCode()); + result = (result * PRIME) + (this.offerType == null ? 43 : this.offerType.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Pricing.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Pricing.java index 43658e8a9a..d118350e09 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Pricing.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/Pricing.java @@ -5,7 +5,7 @@ package com.oracle.bmc.marketplaceprivateoffer.model; /** - * the pricing information for the offer + * The pricing information for the offer. *
* 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 @@ -30,13 +30,13 @@ public Pricing(String currencyType, Long totalAmount, BillingCycle billingCycle) @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The currency supported for a given Offer, in the format specified by ISO-4217 + * The currency supported for a given Offer, in the format specified by ISO-4217. **/ @com.fasterxml.jackson.annotation.JsonProperty("currencyType") private String currencyType; /** - * The currency supported for a given Offer, in the format specified by ISO-4217 + * The currency supported for a given Offer, in the format specified by ISO-4217. * @param currencyType the value to set * @return this builder **/ @@ -46,13 +46,13 @@ public Builder currencyType(String currencyType) { return this; } /** - * The total amount an Offer costs + * The total amount an offer costs. **/ @com.fasterxml.jackson.annotation.JsonProperty("totalAmount") private Long totalAmount; /** - * The total amount an Offer costs + * The total amount an offer costs. * @param totalAmount the value to set * @return this builder **/ @@ -62,13 +62,13 @@ public Builder totalAmount(Long totalAmount) { return this; } /** - * The frequency at which the customer is billed for the Offer + * The frequency at which the customer is billed for the offer. **/ @com.fasterxml.jackson.annotation.JsonProperty("billingCycle") private BillingCycle billingCycle; /** - * The frequency at which the customer is billed for the Offer + * The frequency at which the customer is billed for the offer. * @param billingCycle the value to set * @return this builder **/ @@ -116,13 +116,13 @@ public Builder toBuilder() { } /** - * The currency supported for a given Offer, in the format specified by ISO-4217 + * The currency supported for a given Offer, in the format specified by ISO-4217. **/ @com.fasterxml.jackson.annotation.JsonProperty("currencyType") private final String currencyType; /** - * The currency supported for a given Offer, in the format specified by ISO-4217 + * The currency supported for a given Offer, in the format specified by ISO-4217. * @return the value **/ public String getCurrencyType() { @@ -130,13 +130,13 @@ public String getCurrencyType() { } /** - * The total amount an Offer costs + * The total amount an offer costs. **/ @com.fasterxml.jackson.annotation.JsonProperty("totalAmount") private final Long totalAmount; /** - * The total amount an Offer costs + * The total amount an offer costs. * @return the value **/ public Long getTotalAmount() { @@ -144,7 +144,7 @@ public Long getTotalAmount() { } /** - * The frequency at which the customer is billed for the Offer + * The frequency at which the customer is billed for the offer. **/ public enum BillingCycle { OneTime("ONE_TIME"), @@ -191,13 +191,13 @@ public static BillingCycle create(String key) { } }; /** - * The frequency at which the customer is billed for the Offer + * The frequency at which the customer is billed for the offer. **/ @com.fasterxml.jackson.annotation.JsonProperty("billingCycle") private final BillingCycle billingCycle; /** - * The frequency at which the customer is billed for the Offer + * The frequency at which the customer is billed for the offer. * @return the value **/ public BillingCycle getBillingCycle() { diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachment.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachment.java new file mode 100644 index 0000000000..8cce626554 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachment.java @@ -0,0 +1,882 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Description of an offer quote attachment. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = QuoteAttachment.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuoteAttachment extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "offerQuoteId", + "resellerCompartmentId", + "isvCompartmentId", + "displayName", + "type", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "mimeType", + "recipient", + "freeformTags", + "definedTags", + "systemTags" + }) + public QuoteAttachment( + String id, + String offerQuoteId, + String resellerCompartmentId, + String isvCompartmentId, + String displayName, + Type type, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String mimeType, + Recipient recipient, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.offerQuoteId = offerQuoteId; + this.resellerCompartmentId = resellerCompartmentId; + this.isvCompartmentId = isvCompartmentId; + this.displayName = displayName; + this.type = type; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.mimeType = mimeType; + this.recipient = recipient; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Unique identifier of the associated offer quote that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteId") + private String offerQuoteId; + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + * @param offerQuoteId the value to set + * @return this builder + **/ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + this.__explicitlySet__.add("offerQuoteId"); + return this; + } + /** + * OCID of the reseller's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private String resellerCompartmentId; + + /** + * OCID of the reseller's tenancy (root compartment). + * @param resellerCompartmentId the value to set + * @return this builder + **/ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + this.__explicitlySet__.add("resellerCompartmentId"); + return this; + } + /** + * OCID of the ISV's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * OCID of the ISV's tenancy (root compartment). + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name used to refer to the uploaded data. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The type of offer quote attachment. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + * @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 time the offer quote attachment was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + * @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 the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the offer quote attachment. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The MIME type of the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mimeType") + private String mimeType; + + /** + * The MIME type of the uploaded data. + * @param mimeType the value to set + * @return this builder + **/ + public Builder mimeType(String mimeType) { + this.mimeType = mimeType; + this.__explicitlySet__.add("mimeType"); + return this; + } + /** + * The recipient of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private Recipient recipient; + + /** + * The recipient of the offer quote attachment. + * @param recipient the value to set + * @return this builder + **/ + public Builder recipient(Recipient recipient) { + this.recipient = recipient; + this.__explicitlySet__.add("recipient"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 QuoteAttachment build() { + QuoteAttachment model = + new QuoteAttachment( + this.id, + this.offerQuoteId, + this.resellerCompartmentId, + this.isvCompartmentId, + this.displayName, + this.type, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.mimeType, + this.recipient, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuoteAttachment model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("offerQuoteId")) { + this.offerQuoteId(model.getOfferQuoteId()); + } + if (model.wasPropertyExplicitlySet("resellerCompartmentId")) { + this.resellerCompartmentId(model.getResellerCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + 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("mimeType")) { + this.mimeType(model.getMimeType()); + } + if (model.wasPropertyExplicitlySet("recipient")) { + this.recipient(model.getRecipient()); + } + 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); + } + + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteId") + private final String offerQuoteId; + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + * @return the value + **/ + public String getOfferQuoteId() { + return offerQuoteId; + } + + /** + * OCID of the reseller's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private final String resellerCompartmentId; + + /** + * OCID of the reseller's tenancy (root compartment). + * @return the value + **/ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + + /** + * OCID of the ISV's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * OCID of the ISV's tenancy (root compartment). + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name used to refer to the uploaded data. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The type of offer quote attachment. + **/ + public enum Type { + ContractTAndC("CONTRACT_T_AND_C"), + Quote("QUOTE"), + Eula("EULA"), + TermsOfUse("TERMS_OF_USE"), + Misc("MISC"), + + /** + * 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(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The type of offer quote attachment. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the offer quote attachment. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + 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 the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the offer quote attachment. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The MIME type of the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mimeType") + private final String mimeType; + + /** + * The MIME type of the uploaded data. + * @return the value + **/ + public String getMimeType() { + return mimeType; + } + + /** + * The recipient of the offer quote attachment. + **/ + public enum Recipient { + Reseller("RESELLER"), + Buyer("BUYER"), + + /** + * 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(Recipient.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Recipient v : Recipient.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Recipient(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Recipient create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Recipient', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The recipient of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private final Recipient recipient; + + /** + * The recipient of the offer quote attachment. + * @return the value + **/ + public Recipient getRecipient() { + return recipient; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("QuoteAttachment("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(", resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", type=").append(String.valueOf(this.type)); + 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(", mimeType=").append(String.valueOf(this.mimeType)); + sb.append(", recipient=").append(String.valueOf(this.recipient)); + 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 QuoteAttachment)) { + return false; + } + + QuoteAttachment other = (QuoteAttachment) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.type, other.type) + && 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.mimeType, other.mimeType) + && java.util.Objects.equals(this.recipient, other.recipient) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.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.mimeType == null ? 43 : this.mimeType.hashCode()); + result = (result * PRIME) + (this.recipient == null ? 43 : this.recipient.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentCollection.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentCollection.java new file mode 100644 index 0000000000..4c2d34aea8 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Results of offer quote attachment summaries. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = QuoteAttachmentCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuoteAttachmentCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public QuoteAttachmentCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of offer quote attachments. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of offer quote attachments. + * @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 QuoteAttachmentCollection build() { + QuoteAttachmentCollection model = new QuoteAttachmentCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuoteAttachmentCollection 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 offer quote attachments. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of offer quote attachments. + * @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("QuoteAttachmentCollection("); + 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 QuoteAttachmentCollection)) { + return false; + } + + QuoteAttachmentCollection other = (QuoteAttachmentCollection) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentSummary.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentSummary.java new file mode 100644 index 0000000000..fdc036bbe5 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/QuoteAttachmentSummary.java @@ -0,0 +1,736 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Summary of offer quote attachment. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = QuoteAttachmentSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuoteAttachmentSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "offerQuoteId", + "resellerCompartmentId", + "isvCompartmentId", + "displayName", + "type", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "mimeType", + "recipient", + "freeformTags", + "definedTags", + "systemTags" + }) + public QuoteAttachmentSummary( + String id, + String offerQuoteId, + String resellerCompartmentId, + String isvCompartmentId, + String displayName, + QuoteAttachment.Type type, + java.util.Date timeCreated, + java.util.Date timeUpdated, + QuoteAttachment.LifecycleState lifecycleState, + String lifecycleDetails, + String mimeType, + QuoteAttachment.Recipient recipient, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.offerQuoteId = offerQuoteId; + this.resellerCompartmentId = resellerCompartmentId; + this.isvCompartmentId = isvCompartmentId; + this.displayName = displayName; + this.type = type; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.mimeType = mimeType; + this.recipient = recipient; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Unique identifier of the associated offer quote that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteId") + private String offerQuoteId; + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + * @param offerQuoteId the value to set + * @return this builder + **/ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + this.__explicitlySet__.add("offerQuoteId"); + return this; + } + /** + * OCID of the reseller's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private String resellerCompartmentId; + + /** + * OCID of the reseller's tenancy (root compartment). + * @param resellerCompartmentId the value to set + * @return this builder + **/ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + this.__explicitlySet__.add("resellerCompartmentId"); + return this; + } + /** + * OCID of the ISV's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * OCID of the ISV's tenancy (root compartment). + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name used to refer to the uploaded data. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private QuoteAttachment.Type type; + + /** + * The type of offer quote attachment. + * @param type the value to set + * @return this builder + **/ + public Builder type(QuoteAttachment.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + * @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 time the offer quote attachment was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + * @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 the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private QuoteAttachment.LifecycleState lifecycleState; + + /** + * The current state of the offer quote attachment. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(QuoteAttachment.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The MIME type of the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mimeType") + private String mimeType; + + /** + * The MIME type of the uploaded data. + * @param mimeType the value to set + * @return this builder + **/ + public Builder mimeType(String mimeType) { + this.mimeType = mimeType; + this.__explicitlySet__.add("mimeType"); + return this; + } + /** + * The current state of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private QuoteAttachment.Recipient recipient; + + /** + * The current state of the offer quote attachment. + * @param recipient the value to set + * @return this builder + **/ + public Builder recipient(QuoteAttachment.Recipient recipient) { + this.recipient = recipient; + this.__explicitlySet__.add("recipient"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 QuoteAttachmentSummary build() { + QuoteAttachmentSummary model = + new QuoteAttachmentSummary( + this.id, + this.offerQuoteId, + this.resellerCompartmentId, + this.isvCompartmentId, + this.displayName, + this.type, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.mimeType, + this.recipient, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuoteAttachmentSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("offerQuoteId")) { + this.offerQuoteId(model.getOfferQuoteId()); + } + if (model.wasPropertyExplicitlySet("resellerCompartmentId")) { + this.resellerCompartmentId(model.getResellerCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + 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("mimeType")) { + this.mimeType(model.getMimeType()); + } + if (model.wasPropertyExplicitlySet("recipient")) { + this.recipient(model.getRecipient()); + } + 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); + } + + /** + * Unique identifier that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offerQuoteId") + private final String offerQuoteId; + + /** + * Unique identifier of the associated offer quote that is immutable on creation. + * @return the value + **/ + public String getOfferQuoteId() { + return offerQuoteId; + } + + /** + * OCID of the reseller's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resellerCompartmentId") + private final String resellerCompartmentId; + + /** + * OCID of the reseller's tenancy (root compartment). + * @return the value + **/ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + + /** + * OCID of the ISV's tenancy (root compartment). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * OCID of the ISV's tenancy (root compartment). + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * The name used to refer to the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name used to refer to the uploaded data. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The type of offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final QuoteAttachment.Type type; + + /** + * The type of offer quote attachment. + * @return the value + **/ + public QuoteAttachment.Type getType() { + return type; + } + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the offer quote attachment was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the offer quote attachment was updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final QuoteAttachment.LifecycleState lifecycleState; + + /** + * The current state of the offer quote attachment. + * @return the value + **/ + public QuoteAttachment.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Provides detailed information about the current state of the offer quote attachment. For example, if the offer quote attachment is in a failed state this message can include specific validation errors. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The MIME type of the uploaded data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mimeType") + private final String mimeType; + + /** + * The MIME type of the uploaded data. + * @return the value + **/ + public String getMimeType() { + return mimeType; + } + + /** + * The current state of the offer quote attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recipient") + private final QuoteAttachment.Recipient recipient; + + /** + * The current state of the offer quote attachment. + * @return the value + **/ + public QuoteAttachment.Recipient getRecipient() { + return recipient; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("QuoteAttachmentSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(", resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", type=").append(String.valueOf(this.type)); + 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(", mimeType=").append(String.valueOf(this.mimeType)); + sb.append(", recipient=").append(String.valueOf(this.recipient)); + 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 QuoteAttachmentSummary)) { + return false; + } + + QuoteAttachmentSummary other = (QuoteAttachmentSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.type, other.type) + && 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.mimeType, other.mimeType) + && java.util.Objects.equals(this.recipient, other.recipient) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.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.mimeType == null ? 43 : this.mimeType.hashCode()); + result = (result * PRIME) + (this.recipient == null ? 43 : this.recipient.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResellerInformation.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResellerInformation.java new file mode 100644 index 0000000000..eeff47a6e3 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResellerInformation.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The information related to the reseller of an offer quote. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResellerInformation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResellerInformation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"primaryContact", "additionalContacts"}) + public ResellerInformation(Contact primaryContact, java.util.List additionalContacts) { + super(); + this.primaryContact = primaryContact; + this.additionalContacts = additionalContacts; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("primaryContact") + private Contact primaryContact; + + public Builder primaryContact(Contact primaryContact) { + this.primaryContact = primaryContact; + this.__explicitlySet__.add("primaryContact"); + return this; + } + /** + * The additional contacts associated with the reseller. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalContacts") + private java.util.List additionalContacts; + + /** + * The additional contacts associated with the reseller. + * @param additionalContacts the value to set + * @return this builder + **/ + public Builder additionalContacts(java.util.List additionalContacts) { + this.additionalContacts = additionalContacts; + this.__explicitlySet__.add("additionalContacts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResellerInformation build() { + ResellerInformation model = + new ResellerInformation(this.primaryContact, this.additionalContacts); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResellerInformation model) { + if (model.wasPropertyExplicitlySet("primaryContact")) { + this.primaryContact(model.getPrimaryContact()); + } + if (model.wasPropertyExplicitlySet("additionalContacts")) { + this.additionalContacts(model.getAdditionalContacts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("primaryContact") + private final Contact primaryContact; + + public Contact getPrimaryContact() { + return primaryContact; + } + + /** + * The additional contacts associated with the reseller. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalContacts") + private final java.util.List additionalContacts; + + /** + * The additional contacts associated with the reseller. + * @return the value + **/ + public java.util.List getAdditionalContacts() { + return additionalContacts; + } + + @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("ResellerInformation("); + sb.append("super=").append(super.toString()); + sb.append("primaryContact=").append(String.valueOf(this.primaryContact)); + sb.append(", additionalContacts=").append(String.valueOf(this.additionalContacts)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResellerInformation)) { + return false; + } + + ResellerInformation other = (ResellerInformation) o; + return java.util.Objects.equals(this.primaryContact, other.primaryContact) + && java.util.Objects.equals(this.additionalContacts, other.additionalContacts) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.primaryContact == null ? 43 : this.primaryContact.hashCode()); + result = + (result * PRIME) + + (this.additionalContacts == null + ? 43 + : this.additionalContacts.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResourceBundle.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResourceBundle.java index 4cf86c2b3d..8861e4c3c4 100644 --- a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResourceBundle.java +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/ResourceBundle.java @@ -5,7 +5,7 @@ package com.oracle.bmc.marketplaceprivateoffer.model; /** - * Resource Bundle associated with an Offer + * Resource bundle associated with an offer. *
* 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 @@ -35,13 +35,13 @@ public ResourceBundle( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The type of resources in the bundle + * The type of resources in the bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("type") private Type type; /** - * The type of resources in the bundle + * The type of resources in the bundle. * @param type the value to set * @return this builder **/ @@ -51,13 +51,13 @@ public Builder type(Type type) { return this; } /** - * The quantity of a resources associated with the bundle + * The quantity of a resources associated with the bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("quantity") private Long quantity; /** - * The quantity of a resources associated with the bundle + * The quantity of a resources associated with the bundle. * @param quantity the value to set * @return this builder **/ @@ -67,13 +67,13 @@ public Builder quantity(Long quantity) { return this; } /** - * The unit of measurement for the resource bundle + * The unit of measurement for the resource bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("unitOfMeasurement") private UnitOfMeasurement unitOfMeasurement; /** - * The unit of measurement for the resource bundle + * The unit of measurement for the resource bundle. * @param unitOfMeasurement the value to set * @return this builder **/ @@ -83,13 +83,13 @@ public Builder unitOfMeasurement(UnitOfMeasurement unitOfMeasurement) { return this; } /** - * the ids of the resources in the Offer + * The IDs of the resources in the offer. **/ @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") private java.util.List resourceIds; /** - * the ids of the resources in the Offer + * The IDs of the resources in the offer. * @param resourceIds the value to set * @return this builder **/ @@ -142,7 +142,7 @@ public Builder toBuilder() { } /** - * The type of resources in the bundle + * The type of resources in the bundle. **/ public enum Type { Listing("LISTING"), @@ -187,13 +187,13 @@ public static Type create(String key) { } }; /** - * The type of resources in the bundle + * The type of resources in the bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("type") private final Type type; /** - * The type of resources in the bundle + * The type of resources in the bundle. * @return the value **/ public Type getType() { @@ -201,13 +201,13 @@ public Type getType() { } /** - * The quantity of a resources associated with the bundle + * The quantity of a resources associated with the bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("quantity") private final Long quantity; /** - * The quantity of a resources associated with the bundle + * The quantity of a resources associated with the bundle. * @return the value **/ public Long getQuantity() { @@ -215,7 +215,7 @@ public Long getQuantity() { } /** - * The unit of measurement for the resource bundle + * The unit of measurement for the resource bundle. **/ public enum UnitOfMeasurement { OcpuPerHour("OCPU_PER_HOUR"), @@ -266,13 +266,13 @@ public static UnitOfMeasurement create(String key) { } }; /** - * The unit of measurement for the resource bundle + * The unit of measurement for the resource bundle. **/ @com.fasterxml.jackson.annotation.JsonProperty("unitOfMeasurement") private final UnitOfMeasurement unitOfMeasurement; /** - * The unit of measurement for the resource bundle + * The unit of measurement for the resource bundle. * @return the value **/ public UnitOfMeasurement getUnitOfMeasurement() { @@ -280,13 +280,13 @@ public UnitOfMeasurement getUnitOfMeasurement() { } /** - * the ids of the resources in the Offer + * The IDs of the resources in the offer. **/ @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") private final java.util.List resourceIds; /** - * the ids of the resources in the Offer + * The IDs of the resources in the offer. * @return the value **/ public java.util.List getResourceIds() { diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/RespondToOfferQuoteDetails.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/RespondToOfferQuoteDetails.java new file mode 100644 index 0000000000..70af3bf4ea --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/RespondToOfferQuoteDetails.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * Details for the offer quote ISV response. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RespondToOfferQuoteDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RespondToOfferQuoteDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"pricing"}) + public RespondToOfferQuoteDetails(Pricing pricing) { + super(); + this.pricing = pricing; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private Pricing pricing; + + public Builder pricing(Pricing pricing) { + this.pricing = pricing; + this.__explicitlySet__.add("pricing"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RespondToOfferQuoteDetails build() { + RespondToOfferQuoteDetails model = new RespondToOfferQuoteDetails(this.pricing); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RespondToOfferQuoteDetails model) { + if (model.wasPropertyExplicitlySet("pricing")) { + this.pricing(model.getPricing()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("pricing") + private final Pricing pricing; + + public Pricing getPricing() { + return pricing; + } + + @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("RespondToOfferQuoteDetails("); + sb.append("super=").append(super.toString()); + sb.append("pricing=").append(String.valueOf(this.pricing)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RespondToOfferQuoteDetails)) { + return false; + } + + RespondToOfferQuoteDetails other = (RespondToOfferQuoteDetails) o; + return java.util.Objects.equals(this.pricing, other.pricing) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.pricing == null ? 43 : this.pricing.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/UpdateOfferQuoteDetails.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/UpdateOfferQuoteDetails.java new file mode 100644 index 0000000000..09a4daa334 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/model/UpdateOfferQuoteDetails.java @@ -0,0 +1,596 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.model; + +/** + * The information 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateOfferQuoteDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateOfferQuoteDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "isvCompartmentId", + "isvPublisherId", + "description", + "buyerCompartmentIds", + "resellerInformation", + "isvInformation", + "resourceBundles", + "buyerAcceptanceDeadline", + "buyerOfferDuration", + "freeformTags", + "definedTags" + }) + public UpdateOfferQuoteDetails( + String displayName, + String isvCompartmentId, + String isvPublisherId, + String description, + java.util.List buyerCompartmentIds, + ResellerInformation resellerInformation, + IsvInformation isvInformation, + java.util.List resourceBundles, + java.util.Date buyerAcceptanceDeadline, + String buyerOfferDuration, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.isvCompartmentId = isvCompartmentId; + this.isvPublisherId = isvPublisherId; + this.description = description; + this.buyerCompartmentIds = buyerCompartmentIds; + this.resellerInformation = resellerInformation; + this.isvInformation = isvInformation; + this.resourceBundles = resourceBundles; + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.buyerOfferDuration = buyerOfferDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Offer quotes identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Offer quotes identifier. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Compartment identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private String isvCompartmentId; + + /** + * Compartment identifier of the ISV. + * @param isvCompartmentId the value to set + * @return this builder + **/ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + this.__explicitlySet__.add("isvCompartmentId"); + return this; + } + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @param isvPublisherId the value to set + * @return this builder + **/ + public Builder isvPublisherId(String isvPublisherId) { + this.isvPublisherId = isvPublisherId; + this.__explicitlySet__.add("isvPublisherId"); + return this; + } + /** + * Description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the offer quote. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @param buyerCompartmentIds the value to set + * @return this builder + **/ + public Builder buyerCompartmentIds(java.util.List buyerCompartmentIds) { + this.buyerCompartmentIds = buyerCompartmentIds; + this.__explicitlySet__.add("buyerCompartmentIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private ResellerInformation resellerInformation; + + public Builder resellerInformation(ResellerInformation resellerInformation) { + this.resellerInformation = resellerInformation; + this.__explicitlySet__.add("resellerInformation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private IsvInformation isvInformation; + + public Builder isvInformation(IsvInformation isvInformation) { + this.isvInformation = isvInformation; + this.__explicitlySet__.add("isvInformation"); + return this; + } + /** + * A list of resource bundles associated with an offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer. + * @param resourceBundles the value to set + * @return this builder + **/ + public Builder resourceBundles(java.util.List resourceBundles) { + this.resourceBundles = resourceBundles; + this.__explicitlySet__.add("resourceBundles"); + return this; + } + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @param buyerAcceptanceDeadline the value to set + * @return this builder + **/ + public Builder buyerAcceptanceDeadline(java.util.Date buyerAcceptanceDeadline) { + this.buyerAcceptanceDeadline = buyerAcceptanceDeadline; + this.__explicitlySet__.add("buyerAcceptanceDeadline"); + return this; + } + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @param buyerOfferDuration the value to set + * @return this builder + **/ + public Builder buyerOfferDuration(String buyerOfferDuration) { + this.buyerOfferDuration = buyerOfferDuration; + this.__explicitlySet__.add("buyerOfferDuration"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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 UpdateOfferQuoteDetails build() { + UpdateOfferQuoteDetails model = + new UpdateOfferQuoteDetails( + this.displayName, + this.isvCompartmentId, + this.isvPublisherId, + this.description, + this.buyerCompartmentIds, + this.resellerInformation, + this.isvInformation, + this.resourceBundles, + this.buyerAcceptanceDeadline, + this.buyerOfferDuration, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateOfferQuoteDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("isvCompartmentId")) { + this.isvCompartmentId(model.getIsvCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isvPublisherId")) { + this.isvPublisherId(model.getIsvPublisherId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("buyerCompartmentIds")) { + this.buyerCompartmentIds(model.getBuyerCompartmentIds()); + } + if (model.wasPropertyExplicitlySet("resellerInformation")) { + this.resellerInformation(model.getResellerInformation()); + } + if (model.wasPropertyExplicitlySet("isvInformation")) { + this.isvInformation(model.getIsvInformation()); + } + if (model.wasPropertyExplicitlySet("resourceBundles")) { + this.resourceBundles(model.getResourceBundles()); + } + if (model.wasPropertyExplicitlySet("buyerAcceptanceDeadline")) { + this.buyerAcceptanceDeadline(model.getBuyerAcceptanceDeadline()); + } + if (model.wasPropertyExplicitlySet("buyerOfferDuration")) { + this.buyerOfferDuration(model.getBuyerOfferDuration()); + } + 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); + } + + /** + * Offer quotes identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Offer quotes identifier. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Compartment identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvCompartmentId") + private final String isvCompartmentId; + + /** + * Compartment identifier of the ISV. + * @return the value + **/ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + + /** + * Publisher identifier of the ISV. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isvPublisherId") + private final String isvPublisherId; + + /** + * Publisher identifier of the ISV. + * @return the value + **/ + public String getIsvPublisherId() { + return isvPublisherId; + } + + /** + * Description of the offer quote. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the offer quote. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * A list of buyer tenancies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerCompartmentIds") + private final java.util.List buyerCompartmentIds; + + /** + * A list of buyer tenancies. + * @return the value + **/ + public java.util.List getBuyerCompartmentIds() { + return buyerCompartmentIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resellerInformation") + private final ResellerInformation resellerInformation; + + public ResellerInformation getResellerInformation() { + return resellerInformation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isvInformation") + private final IsvInformation isvInformation; + + public IsvInformation getIsvInformation() { + return isvInformation; + } + + /** + * A list of resource bundles associated with an offer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceBundles") + private final java.util.List resourceBundles; + + /** + * A list of resource bundles associated with an offer. + * @return the value + **/ + public java.util.List getResourceBundles() { + return resourceBundles; + } + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerAcceptanceDeadline") + private final java.util.Date buyerAcceptanceDeadline; + + /** + * The time the offer for the buyer must be accepted by before the offer becomes invalid. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getBuyerAcceptanceDeadline() { + return buyerAcceptanceDeadline; + } + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buyerOfferDuration") + private final String buyerOfferDuration; + + /** + * Duration the offer for the buyer will be active after its start date. An ISO8601 extended formatted string. + * @return the value + **/ + public String getBuyerOfferDuration() { + return buyerOfferDuration; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @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. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @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("UpdateOfferQuoteDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(", isvPublisherId=").append(String.valueOf(this.isvPublisherId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", buyerCompartmentIds=").append(String.valueOf(this.buyerCompartmentIds)); + sb.append(", resellerInformation=").append(String.valueOf(this.resellerInformation)); + sb.append(", isvInformation=").append(String.valueOf(this.isvInformation)); + sb.append(", resourceBundles=").append(String.valueOf(this.resourceBundles)); + sb.append(", buyerAcceptanceDeadline=") + .append(String.valueOf(this.buyerAcceptanceDeadline)); + sb.append(", buyerOfferDuration=").append(String.valueOf(this.buyerOfferDuration)); + 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 UpdateOfferQuoteDetails)) { + return false; + } + + UpdateOfferQuoteDetails other = (UpdateOfferQuoteDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.isvPublisherId, other.isvPublisherId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.buyerCompartmentIds, other.buyerCompartmentIds) + && java.util.Objects.equals(this.resellerInformation, other.resellerInformation) + && java.util.Objects.equals(this.isvInformation, other.isvInformation) + && java.util.Objects.equals(this.resourceBundles, other.resourceBundles) + && java.util.Objects.equals( + this.buyerAcceptanceDeadline, other.buyerAcceptanceDeadline) + && java.util.Objects.equals(this.buyerOfferDuration, other.buyerOfferDuration) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvPublisherId == null ? 43 : this.isvPublisherId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.buyerCompartmentIds == null + ? 43 + : this.buyerCompartmentIds.hashCode()); + result = + (result * PRIME) + + (this.resellerInformation == null + ? 43 + : this.resellerInformation.hashCode()); + result = + (result * PRIME) + + (this.isvInformation == null ? 43 : this.isvInformation.hashCode()); + result = + (result * PRIME) + + (this.resourceBundles == null ? 43 : this.resourceBundles.hashCode()); + result = + (result * PRIME) + + (this.buyerAcceptanceDeadline == null + ? 43 + : this.buyerAcceptanceDeadline.hashCode()); + result = + (result * PRIME) + + (this.buyerOfferDuration == null + ? 43 + : this.buyerOfferDuration.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateOfferQuoteRequest.java new file mode 100644 index 0000000000..c38e7300a2 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateOfferQuoteRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use CreateOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateOfferQuoteRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails> { + + /** + * Details for the new offer quote. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails + createOfferQuoteDetails; + + /** + * Details for the new offer quote. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails + getCreateOfferQuoteDetails() { + return createOfferQuoteDetails; + } + /** + * 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; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails getBody$() { + return createOfferQuoteDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOfferQuoteRequest, + com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new offer quote. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails + createOfferQuoteDetails = null; + + /** + * Details for the new offer quote. + * @param createOfferQuoteDetails the value to set + * @return this builder instance + */ + public Builder createOfferQuoteDetails( + com.oracle.bmc.marketplaceprivateoffer.model.CreateOfferQuoteDetails + createOfferQuoteDetails) { + this.createOfferQuoteDetails = createOfferQuoteDetails; + 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; + } + + /** + * 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; + } + + /** + * 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.util.internal.Consumer + 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(CreateOfferQuoteRequest o) { + createOfferQuoteDetails(o.getCreateOfferQuoteDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOfferQuoteRequest + */ + public CreateOfferQuoteRequest build() { + CreateOfferQuoteRequest 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.marketplaceprivateoffer.model.CreateOfferQuoteDetails body) { + createOfferQuoteDetails(body); + return this; + } + + /** + * Build the instance of CreateOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOfferQuoteRequest + */ + public CreateOfferQuoteRequest buildWithoutInvocationCallback() { + CreateOfferQuoteRequest request = new CreateOfferQuoteRequest(); + request.createOfferQuoteDetails = createOfferQuoteDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOfferQuoteRequest(createOfferQuoteDetails, 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() + .createOfferQuoteDetails(createOfferQuoteDetails) + .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(",createOfferQuoteDetails=").append(String.valueOf(this.createOfferQuoteDetails)); + 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 CreateOfferQuoteRequest)) { + return false; + } + + CreateOfferQuoteRequest other = (CreateOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createOfferQuoteDetails, other.createOfferQuoteDetails) + && 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.createOfferQuoteDetails == null + ? 43 + : this.createOfferQuoteDetails.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateQuoteAttachmentRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateQuoteAttachmentRequest.java new file mode 100644 index 0000000000..0816eeafb5 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/CreateQuoteAttachmentRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use CreateQuoteAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateQuoteAttachmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails> { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * Details for the new offer quote attachment. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails + createQuoteAttachmentDetails; + + /** + * Details for the new offer quote attachment. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails + getCreateQuoteAttachmentDetails() { + return createQuoteAttachmentDetails; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails getBody$() { + return createQuoteAttachmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateQuoteAttachmentRequest, + com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * Details for the new offer quote attachment. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails + createQuoteAttachmentDetails = null; + + /** + * Details for the new offer quote attachment. + * @param createQuoteAttachmentDetails the value to set + * @return this builder instance + */ + public Builder createQuoteAttachmentDetails( + com.oracle.bmc.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails + createQuoteAttachmentDetails) { + this.createQuoteAttachmentDetails = createQuoteAttachmentDetails; + 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.util.internal.Consumer + 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(CreateQuoteAttachmentRequest o) { + offerQuoteId(o.getOfferQuoteId()); + createQuoteAttachmentDetails(o.getCreateQuoteAttachmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateQuoteAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateQuoteAttachmentRequest + */ + public CreateQuoteAttachmentRequest build() { + CreateQuoteAttachmentRequest 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.marketplaceprivateoffer.model.CreateQuoteAttachmentDetails body) { + createQuoteAttachmentDetails(body); + return this; + } + + /** + * Build the instance of CreateQuoteAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateQuoteAttachmentRequest + */ + public CreateQuoteAttachmentRequest buildWithoutInvocationCallback() { + CreateQuoteAttachmentRequest request = new CreateQuoteAttachmentRequest(); + request.offerQuoteId = offerQuoteId; + request.createQuoteAttachmentDetails = createQuoteAttachmentDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateQuoteAttachmentRequest(offerQuoteId, createQuoteAttachmentDetails, 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() + .offerQuoteId(offerQuoteId) + .createQuoteAttachmentDetails(createQuoteAttachmentDetails) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",createQuoteAttachmentDetails=") + .append(String.valueOf(this.createQuoteAttachmentDetails)); + 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 CreateQuoteAttachmentRequest)) { + return false; + } + + CreateQuoteAttachmentRequest other = (CreateQuoteAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals( + this.createQuoteAttachmentDetails, other.createQuoteAttachmentDetails) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.createQuoteAttachmentDetails == null + ? 43 + : this.createQuoteAttachmentDetails.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteOfferQuoteRequest.java new file mode 100644 index 0000000000..ffc6752e14 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteOfferQuoteRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use DeleteOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteOfferQuoteRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteOfferQuoteRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(DeleteOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteOfferQuoteRequest + */ + public DeleteOfferQuoteRequest build() { + DeleteOfferQuoteRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteOfferQuoteRequest + */ + public DeleteOfferQuoteRequest buildWithoutInvocationCallback() { + DeleteOfferQuoteRequest request = new DeleteOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteOfferQuoteRequest(offerQuoteId, 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().offerQuoteId(offerQuoteId).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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + 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 DeleteOfferQuoteRequest)) { + return false; + } + + DeleteOfferQuoteRequest other = (DeleteOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteQuoteAttachmentRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteQuoteAttachmentRequest.java new file mode 100644 index 0000000000..2b57dbeb5e --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/DeleteQuoteAttachmentRequest.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use DeleteQuoteAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteQuoteAttachmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId; + + /** + * Unique offer quote attachment identifier. + */ + public String getQuoteAttachmentId() { + return quoteAttachmentId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteQuoteAttachmentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId = null; + + /** + * Unique offer quote attachment identifier. + * @param quoteAttachmentId the value to set + * @return this builder instance + */ + public Builder quoteAttachmentId(String quoteAttachmentId) { + this.quoteAttachmentId = quoteAttachmentId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(DeleteQuoteAttachmentRequest o) { + offerQuoteId(o.getOfferQuoteId()); + quoteAttachmentId(o.getQuoteAttachmentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteQuoteAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteQuoteAttachmentRequest + */ + public DeleteQuoteAttachmentRequest build() { + DeleteQuoteAttachmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteQuoteAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteQuoteAttachmentRequest + */ + public DeleteQuoteAttachmentRequest buildWithoutInvocationCallback() { + DeleteQuoteAttachmentRequest request = new DeleteQuoteAttachmentRequest(); + request.offerQuoteId = offerQuoteId; + request.quoteAttachmentId = quoteAttachmentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteQuoteAttachmentRequest(offerQuoteId, quoteAttachmentId, 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() + .offerQuoteId(offerQuoteId) + .quoteAttachmentId(quoteAttachmentId) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",quoteAttachmentId=").append(String.valueOf(this.quoteAttachmentId)); + 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 DeleteQuoteAttachmentRequest)) { + return false; + } + + DeleteQuoteAttachmentRequest other = (DeleteQuoteAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.quoteAttachmentId, other.quoteAttachmentId) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.quoteAttachmentId == null ? 43 : this.quoteAttachmentId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteInternalDetailRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteInternalDetailRequest.java new file mode 100644 index 0000000000..0474e89695 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteInternalDetailRequest.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use GetOfferQuoteInternalDetailRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteInternalDetailRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetOfferQuoteInternalDetailRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetOfferQuoteInternalDetailRequest o) { + offerQuoteId(o.getOfferQuoteId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetOfferQuoteInternalDetailRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetOfferQuoteInternalDetailRequest + */ + public GetOfferQuoteInternalDetailRequest build() { + GetOfferQuoteInternalDetailRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetOfferQuoteInternalDetailRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetOfferQuoteInternalDetailRequest + */ + public GetOfferQuoteInternalDetailRequest buildWithoutInvocationCallback() { + GetOfferQuoteInternalDetailRequest request = new GetOfferQuoteInternalDetailRequest(); + request.offerQuoteId = offerQuoteId; + request.opcRequestId = opcRequestId; + return request; + // new GetOfferQuoteInternalDetailRequest(offerQuoteId, 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().offerQuoteId(offerQuoteId).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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + 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 GetOfferQuoteInternalDetailRequest)) { + return false; + } + + GetOfferQuoteInternalDetailRequest other = (GetOfferQuoteInternalDetailRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteRequest.java new file mode 100644 index 0000000000..6cac3118ea --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetOfferQuoteRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use GetOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetOfferQuoteRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetOfferQuoteRequest + */ + public GetOfferQuoteRequest build() { + GetOfferQuoteRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetOfferQuoteRequest + */ + public GetOfferQuoteRequest buildWithoutInvocationCallback() { + GetOfferQuoteRequest request = new GetOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.opcRequestId = opcRequestId; + return request; + // new GetOfferQuoteRequest(offerQuoteId, 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().offerQuoteId(offerQuoteId).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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + 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 GetOfferQuoteRequest)) { + return false; + } + + GetOfferQuoteRequest other = (GetOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentContentRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentContentRequest.java new file mode 100644 index 0000000000..2f2e386aaf --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentContentRequest.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use GetQuoteAttachmentContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId; + + /** + * Unique offer quote attachment identifier. + */ + public String getQuoteAttachmentId() { + return quoteAttachmentId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetQuoteAttachmentContentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId = null; + + /** + * Unique offer quote attachment identifier. + * @param quoteAttachmentId the value to set + * @return this builder instance + */ + public Builder quoteAttachmentId(String quoteAttachmentId) { + this.quoteAttachmentId = quoteAttachmentId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetQuoteAttachmentContentRequest o) { + offerQuoteId(o.getOfferQuoteId()); + quoteAttachmentId(o.getQuoteAttachmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetQuoteAttachmentContentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetQuoteAttachmentContentRequest + */ + public GetQuoteAttachmentContentRequest build() { + GetQuoteAttachmentContentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetQuoteAttachmentContentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetQuoteAttachmentContentRequest + */ + public GetQuoteAttachmentContentRequest buildWithoutInvocationCallback() { + GetQuoteAttachmentContentRequest request = new GetQuoteAttachmentContentRequest(); + request.offerQuoteId = offerQuoteId; + request.quoteAttachmentId = quoteAttachmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetQuoteAttachmentContentRequest(offerQuoteId, quoteAttachmentId, 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() + .offerQuoteId(offerQuoteId) + .quoteAttachmentId(quoteAttachmentId) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",quoteAttachmentId=").append(String.valueOf(this.quoteAttachmentId)); + 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 GetQuoteAttachmentContentRequest)) { + return false; + } + + GetQuoteAttachmentContentRequest other = (GetQuoteAttachmentContentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.quoteAttachmentId, other.quoteAttachmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.quoteAttachmentId == null ? 43 : this.quoteAttachmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentRequest.java new file mode 100644 index 0000000000..4cb719e7a2 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/GetQuoteAttachmentRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use GetQuoteAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId; + + /** + * Unique offer quote attachment identifier. + */ + public String getQuoteAttachmentId() { + return quoteAttachmentId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetQuoteAttachmentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * Unique offer quote attachment identifier. + */ + private String quoteAttachmentId = null; + + /** + * Unique offer quote attachment identifier. + * @param quoteAttachmentId the value to set + * @return this builder instance + */ + public Builder quoteAttachmentId(String quoteAttachmentId) { + this.quoteAttachmentId = quoteAttachmentId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(GetQuoteAttachmentRequest o) { + offerQuoteId(o.getOfferQuoteId()); + quoteAttachmentId(o.getQuoteAttachmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetQuoteAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetQuoteAttachmentRequest + */ + public GetQuoteAttachmentRequest build() { + GetQuoteAttachmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetQuoteAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetQuoteAttachmentRequest + */ + public GetQuoteAttachmentRequest buildWithoutInvocationCallback() { + GetQuoteAttachmentRequest request = new GetQuoteAttachmentRequest(); + request.offerQuoteId = offerQuoteId; + request.quoteAttachmentId = quoteAttachmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetQuoteAttachmentRequest(offerQuoteId, quoteAttachmentId, 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() + .offerQuoteId(offerQuoteId) + .quoteAttachmentId(quoteAttachmentId) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",quoteAttachmentId=").append(String.valueOf(this.quoteAttachmentId)); + 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 GetQuoteAttachmentRequest)) { + return false; + } + + GetQuoteAttachmentRequest other = (GetQuoteAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.quoteAttachmentId, other.quoteAttachmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.quoteAttachmentId == null ? 43 : this.quoteAttachmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListOfferQuotesRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListOfferQuotesRequest.java new file mode 100644 index 0000000000..6b586ca7b7 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListOfferQuotesRequest.java @@ -0,0 +1,504 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use ListOfferQuotesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListOfferQuotesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId; + + /** + * OCID of the reseller's compartment. + */ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId; + + /** + * OCID of the ISV's compartment. + */ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + /** + * A filter to return resources whose lifecycle state matches the given lifecycle state. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.LifecycleState lifecycleState; + + /** + * A filter to return resources whose lifecycle state matches the given lifecycle state. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique offer quote identifier. + */ + private String id; + + /** + * Unique offer quote identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + 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 timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOfferQuotesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId = null; + + /** + * OCID of the reseller's compartment. + * @param resellerCompartmentId the value to set + * @return this builder instance + */ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + return this; + } + + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId = null; + + /** + * OCID of the ISV's compartment. + * @param isvCompartmentId the value to set + * @return this builder instance + */ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + return this; + } + + /** + * A filter to return resources whose lifecycle state matches the given lifecycle state. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.LifecycleState + lifecycleState = null; + + /** + * A filter to return resources whose lifecycle state matches the given lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique offer quote identifier. + */ + private String id = null; + + /** + * Unique offer quote identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + 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; + } + + /** + * 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.util.internal.Consumer + 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(ListOfferQuotesRequest o) { + resellerCompartmentId(o.getResellerCompartmentId()); + isvCompartmentId(o.getIsvCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + 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 ListOfferQuotesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOfferQuotesRequest + */ + public ListOfferQuotesRequest build() { + ListOfferQuotesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOfferQuotesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOfferQuotesRequest + */ + public ListOfferQuotesRequest buildWithoutInvocationCallback() { + ListOfferQuotesRequest request = new ListOfferQuotesRequest(); + request.resellerCompartmentId = resellerCompartmentId; + request.isvCompartmentId = isvCompartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListOfferQuotesRequest(resellerCompartmentId, isvCompartmentId, lifecycleState, displayName, 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() + .resellerCompartmentId(resellerCompartmentId) + .isvCompartmentId(isvCompartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .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(",resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(",isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + 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 ListOfferQuotesRequest)) { + return false; + } + + ListOfferQuotesRequest other = (ListOfferQuotesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && 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.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListQuoteAttachmentsRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListQuoteAttachmentsRequest.java new file mode 100644 index 0000000000..1f92b78ec0 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/ListQuoteAttachmentsRequest.java @@ -0,0 +1,538 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use ListQuoteAttachmentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListQuoteAttachmentsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId; + + /** + * OCID of the reseller's compartment. + */ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId; + + /** + * OCID of the ISV's compartment. + */ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.LifecycleState + lifecycleState; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique offer quote attachment identifier. + */ + private String id; + + /** + * Unique offer quote attachment identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + 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 timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListQuoteAttachmentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId = null; + + /** + * OCID of the reseller's compartment. + * @param resellerCompartmentId the value to set + * @return this builder instance + */ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + return this; + } + + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId = null; + + /** + * OCID of the ISV's compartment. + * @param isvCompartmentId the value to set + * @return this builder instance + */ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + return this; + } + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique offer quote attachment identifier. + */ + private String id = null; + + /** + * Unique offer quote attachment identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @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 'ASC' or 'DESC'. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.marketplaceprivateoffer.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + 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; + } + + /** + * 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.util.internal.Consumer + 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(ListQuoteAttachmentsRequest o) { + offerQuoteId(o.getOfferQuoteId()); + resellerCompartmentId(o.getResellerCompartmentId()); + isvCompartmentId(o.getIsvCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + 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 ListQuoteAttachmentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListQuoteAttachmentsRequest + */ + public ListQuoteAttachmentsRequest build() { + ListQuoteAttachmentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListQuoteAttachmentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListQuoteAttachmentsRequest + */ + public ListQuoteAttachmentsRequest buildWithoutInvocationCallback() { + ListQuoteAttachmentsRequest request = new ListQuoteAttachmentsRequest(); + request.offerQuoteId = offerQuoteId; + request.resellerCompartmentId = resellerCompartmentId; + request.isvCompartmentId = isvCompartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListQuoteAttachmentsRequest(offerQuoteId, resellerCompartmentId, isvCompartmentId, lifecycleState, displayName, 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() + .offerQuoteId(offerQuoteId) + .resellerCompartmentId(resellerCompartmentId) + .isvCompartmentId(isvCompartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(",isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + 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 ListQuoteAttachmentsRequest)) { + return false; + } + + ListQuoteAttachmentsRequest other = (ListQuoteAttachmentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/RespondToOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/RespondToOfferQuoteRequest.java new file mode 100644 index 0000000000..3c0f396f67 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/RespondToOfferQuoteRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use RespondToOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class RespondToOfferQuoteRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails> { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * Details for the offer quote ISV response. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails + respondToOfferQuoteDetails; + + /** + * Details for the offer quote ISV response. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails + getRespondToOfferQuoteDetails() { + return respondToOfferQuoteDetails; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails getBody$() { + return respondToOfferQuoteDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RespondToOfferQuoteRequest, + com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * Details for the offer quote ISV response. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails + respondToOfferQuoteDetails = null; + + /** + * Details for the offer quote ISV response. + * @param respondToOfferQuoteDetails the value to set + * @return this builder instance + */ + public Builder respondToOfferQuoteDetails( + com.oracle.bmc.marketplaceprivateoffer.model.RespondToOfferQuoteDetails + respondToOfferQuoteDetails) { + this.respondToOfferQuoteDetails = respondToOfferQuoteDetails; + 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.util.internal.Consumer + 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(RespondToOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + respondToOfferQuoteDetails(o.getRespondToOfferQuoteDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RespondToOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RespondToOfferQuoteRequest + */ + public RespondToOfferQuoteRequest build() { + RespondToOfferQuoteRequest 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.marketplaceprivateoffer.model.RespondToOfferQuoteDetails body) { + respondToOfferQuoteDetails(body); + return this; + } + + /** + * Build the instance of RespondToOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RespondToOfferQuoteRequest + */ + public RespondToOfferQuoteRequest buildWithoutInvocationCallback() { + RespondToOfferQuoteRequest request = new RespondToOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.respondToOfferQuoteDetails = respondToOfferQuoteDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new RespondToOfferQuoteRequest(offerQuoteId, respondToOfferQuoteDetails, 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() + .offerQuoteId(offerQuoteId) + .respondToOfferQuoteDetails(respondToOfferQuoteDetails) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",respondToOfferQuoteDetails=") + .append(String.valueOf(this.respondToOfferQuoteDetails)); + 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 RespondToOfferQuoteRequest)) { + return false; + } + + RespondToOfferQuoteRequest other = (RespondToOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals( + this.respondToOfferQuoteDetails, other.respondToOfferQuoteDetails) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.respondToOfferQuoteDetails == null + ? 43 + : this.respondToOfferQuoteDetails.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferQuoteRequest.java new file mode 100644 index 0000000000..6885b53228 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferQuoteRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use SendOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferQuoteRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * 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< + SendOfferQuoteRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + 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.util.internal.Consumer + 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(SendOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SendOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SendOfferQuoteRequest + */ + public SendOfferQuoteRequest build() { + SendOfferQuoteRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SendOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SendOfferQuoteRequest + */ + public SendOfferQuoteRequest buildWithoutInvocationCallback() { + SendOfferQuoteRequest request = new SendOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new SendOfferQuoteRequest(offerQuoteId, 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() + .offerQuoteId(offerQuoteId) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + 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 SendOfferQuoteRequest)) { + return false; + } + + SendOfferQuoteRequest other = (SendOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferRequest.java new file mode 100644 index 0000000000..c69ffa641f --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/SendOfferRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use SendOfferRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Offer identifier + */ + private String offerId; + + /** + * unique Offer identifier + */ + public String getOfferId() { + return offerId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SendOfferRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Offer identifier + */ + private String offerId = null; + + /** + * unique Offer identifier + * @param offerId the value to set + * @return this builder instance + */ + public Builder offerId(String offerId) { + this.offerId = offerId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(SendOfferRequest o) { + offerId(o.getOfferId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SendOfferRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SendOfferRequest + */ + public SendOfferRequest build() { + SendOfferRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SendOfferRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SendOfferRequest + */ + public SendOfferRequest buildWithoutInvocationCallback() { + SendOfferRequest request = new SendOfferRequest(); + request.offerId = offerId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new SendOfferRequest(offerId, 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().offerId(offerId).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(",offerId=").append(String.valueOf(this.offerId)); + 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 SendOfferRequest)) { + return false; + } + + SendOfferRequest other = (SendOfferRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerId, other.offerId) + && 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.offerId == null ? 43 : this.offerId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/UpdateOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/UpdateOfferQuoteRequest.java new file mode 100644 index 0000000000..19d5c3258a --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/UpdateOfferQuoteRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use UpdateOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class UpdateOfferQuoteRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails> { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails + updateOfferQuoteDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails + getUpdateOfferQuoteDetails() { + return updateOfferQuoteDetails; + } + /** + * 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails getBody$() { + return updateOfferQuoteDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateOfferQuoteRequest, + com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails + updateOfferQuoteDetails = null; + + /** + * The information to be updated. + * @param updateOfferQuoteDetails the value to set + * @return this builder instance + */ + public Builder updateOfferQuoteDetails( + com.oracle.bmc.marketplaceprivateoffer.model.UpdateOfferQuoteDetails + updateOfferQuoteDetails) { + this.updateOfferQuoteDetails = updateOfferQuoteDetails; + 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; + } + + /** + * 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.util.internal.Consumer + 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(UpdateOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + updateOfferQuoteDetails(o.getUpdateOfferQuoteDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateOfferQuoteRequest + */ + public UpdateOfferQuoteRequest build() { + UpdateOfferQuoteRequest 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.marketplaceprivateoffer.model.UpdateOfferQuoteDetails body) { + updateOfferQuoteDetails(body); + return this; + } + + /** + * Build the instance of UpdateOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateOfferQuoteRequest + */ + public UpdateOfferQuoteRequest buildWithoutInvocationCallback() { + UpdateOfferQuoteRequest request = new UpdateOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.updateOfferQuoteDetails = updateOfferQuoteDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateOfferQuoteRequest(offerQuoteId, updateOfferQuoteDetails, 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() + .offerQuoteId(offerQuoteId) + .updateOfferQuoteDetails(updateOfferQuoteDetails) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",updateOfferQuoteDetails=").append(String.valueOf(this.updateOfferQuoteDetails)); + 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 UpdateOfferQuoteRequest)) { + return false; + } + + UpdateOfferQuoteRequest other = (UpdateOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals( + this.updateOfferQuoteDetails, other.updateOfferQuoteDetails) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.updateOfferQuoteDetails == null + ? 43 + : this.updateOfferQuoteDetails.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferQuoteRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferQuoteRequest.java new file mode 100644 index 0000000000..9ccdd2bb9c --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferQuoteRequest.java @@ -0,0 +1,371 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use WithdrawOfferQuoteRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferQuoteRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId; + + /** + * Unique offer quote identifier. + */ + public String getOfferQuoteId() { + return offerQuoteId; + } + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId; + + /** + * OCID of the reseller's compartment. + */ + public String getResellerCompartmentId() { + return resellerCompartmentId; + } + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId; + + /** + * OCID of the ISV's compartment. + */ + public String getIsvCompartmentId() { + return isvCompartmentId; + } + /** + * 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< + WithdrawOfferQuoteRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique offer quote identifier. + */ + private String offerQuoteId = null; + + /** + * Unique offer quote identifier. + * @param offerQuoteId the value to set + * @return this builder instance + */ + public Builder offerQuoteId(String offerQuoteId) { + this.offerQuoteId = offerQuoteId; + return this; + } + + /** + * OCID of the reseller's compartment. + */ + private String resellerCompartmentId = null; + + /** + * OCID of the reseller's compartment. + * @param resellerCompartmentId the value to set + * @return this builder instance + */ + public Builder resellerCompartmentId(String resellerCompartmentId) { + this.resellerCompartmentId = resellerCompartmentId; + return this; + } + + /** + * OCID of the ISV's compartment. + */ + private String isvCompartmentId = null; + + /** + * OCID of the ISV's compartment. + * @param isvCompartmentId the value to set + * @return this builder instance + */ + public Builder isvCompartmentId(String isvCompartmentId) { + this.isvCompartmentId = isvCompartmentId; + 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.util.internal.Consumer + 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(WithdrawOfferQuoteRequest o) { + offerQuoteId(o.getOfferQuoteId()); + resellerCompartmentId(o.getResellerCompartmentId()); + isvCompartmentId(o.getIsvCompartmentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of WithdrawOfferQuoteRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of WithdrawOfferQuoteRequest + */ + public WithdrawOfferQuoteRequest build() { + WithdrawOfferQuoteRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of WithdrawOfferQuoteRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of WithdrawOfferQuoteRequest + */ + public WithdrawOfferQuoteRequest buildWithoutInvocationCallback() { + WithdrawOfferQuoteRequest request = new WithdrawOfferQuoteRequest(); + request.offerQuoteId = offerQuoteId; + request.resellerCompartmentId = resellerCompartmentId; + request.isvCompartmentId = isvCompartmentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new WithdrawOfferQuoteRequest(offerQuoteId, resellerCompartmentId, isvCompartmentId, 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() + .offerQuoteId(offerQuoteId) + .resellerCompartmentId(resellerCompartmentId) + .isvCompartmentId(isvCompartmentId) + .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(",offerQuoteId=").append(String.valueOf(this.offerQuoteId)); + sb.append(",resellerCompartmentId=").append(String.valueOf(this.resellerCompartmentId)); + sb.append(",isvCompartmentId=").append(String.valueOf(this.isvCompartmentId)); + 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 WithdrawOfferQuoteRequest)) { + return false; + } + + WithdrawOfferQuoteRequest other = (WithdrawOfferQuoteRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerQuoteId, other.offerQuoteId) + && java.util.Objects.equals(this.resellerCompartmentId, other.resellerCompartmentId) + && java.util.Objects.equals(this.isvCompartmentId, other.isvCompartmentId) + && 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.offerQuoteId == null ? 43 : this.offerQuoteId.hashCode()); + result = + (result * PRIME) + + (this.resellerCompartmentId == null + ? 43 + : this.resellerCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.isvCompartmentId == null ? 43 : this.isvCompartmentId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferRequest.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferRequest.java new file mode 100644 index 0000000000..ee5a6ad294 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/requests/WithdrawOfferRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.requests; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; +/** + * Example: Click here to see how to use WithdrawOfferRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Offer identifier + */ + private String offerId; + + /** + * unique Offer identifier + */ + public String getOfferId() { + return offerId; + } + /** + * 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; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + WithdrawOfferRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Offer identifier + */ + private String offerId = null; + + /** + * unique Offer identifier + * @param offerId the value to set + * @return this builder instance + */ + public Builder offerId(String offerId) { + this.offerId = offerId; + 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; + } + + /** + * 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.util.internal.Consumer + 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(WithdrawOfferRequest o) { + offerId(o.getOfferId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of WithdrawOfferRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of WithdrawOfferRequest + */ + public WithdrawOfferRequest build() { + WithdrawOfferRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of WithdrawOfferRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of WithdrawOfferRequest + */ + public WithdrawOfferRequest buildWithoutInvocationCallback() { + WithdrawOfferRequest request = new WithdrawOfferRequest(); + request.offerId = offerId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new WithdrawOfferRequest(offerId, 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().offerId(offerId).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(",offerId=").append(String.valueOf(this.offerId)); + 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 WithdrawOfferRequest)) { + return false; + } + + WithdrawOfferRequest other = (WithdrawOfferRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.offerId, other.offerId) + && 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.offerId == null ? 43 : this.offerId.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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateOfferQuoteResponse.java new file mode 100644 index 0000000000..268d53f494 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateOfferQuoteResponse.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateOfferQuoteResponse 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; + } + + /** + * URL for the created offer quote. The offer quote OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created offer quote. The offer quote 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 asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote getOfferQuote() { + return offerQuote; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "location", + "contentLocation", + "opcWorkRequestId", + "offerQuote" + }) + private CreateOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + String location, + String contentLocation, + String opcWorkRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.location = location; + this.contentLocation = contentLocation; + this.opcWorkRequestId = opcWorkRequestId; + this.offerQuote = offerQuote; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * URL for the created offer quote. The offer quote OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created offer quote. The offer quote 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 asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * The returned OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @param offerQuote the value to set + * @return this builder + */ + public Builder offerQuote( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + this.offerQuote = offerQuote; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + opcWorkRequestId(o.getOpcWorkRequestId()); + offerQuote(o.getOfferQuote()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOfferQuoteResponse build() { + return new CreateOfferQuoteResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + location, + contentLocation, + opcWorkRequestId, + offerQuote); + } + } + + /** + * 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(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",offerQuote=").append(String.valueOf(offerQuote)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOfferQuoteResponse)) { + return false; + } + + CreateOfferQuoteResponse other = (CreateOfferQuoteResponse) 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.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.offerQuote, other.offerQuote); + } + + @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.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.offerQuote == null ? 43 : this.offerQuote.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateQuoteAttachmentResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateQuoteAttachmentResponse.java new file mode 100644 index 0000000000..49d8b42e3d --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/CreateQuoteAttachmentResponse.java @@ -0,0 +1,333 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class CreateQuoteAttachmentResponse 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; + } + + /** + * URL for the created offer quote attachment. The offer quote attachment OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created offer quote attachment. The offer quote attachment 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 asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned QuoteAttachment instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment; + + /** + * The returned QuoteAttachment instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment getQuoteAttachment() { + return quoteAttachment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "location", + "contentLocation", + "opcWorkRequestId", + "quoteAttachment" + }) + private CreateQuoteAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String location, + String contentLocation, + String opcWorkRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.location = location; + this.contentLocation = contentLocation; + this.opcWorkRequestId = opcWorkRequestId; + this.quoteAttachment = quoteAttachment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * URL for the created offer quote attachment. The offer quote attachment OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created offer quote attachment. The offer quote attachment 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 asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * The returned QuoteAttachment instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment; + + /** + * The returned QuoteAttachment instance. + * @param quoteAttachment the value to set + * @return this builder + */ + public Builder quoteAttachment( + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment) { + this.quoteAttachment = quoteAttachment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateQuoteAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + opcWorkRequestId(o.getOpcWorkRequestId()); + quoteAttachment(o.getQuoteAttachment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateQuoteAttachmentResponse build() { + return new CreateQuoteAttachmentResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + location, + contentLocation, + opcWorkRequestId, + quoteAttachment); + } + } + + /** + * 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(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",quoteAttachment=").append(String.valueOf(quoteAttachment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateQuoteAttachmentResponse)) { + return false; + } + + CreateQuoteAttachmentResponse other = (CreateQuoteAttachmentResponse) 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.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.quoteAttachment, other.quoteAttachment); + } + + @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.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.quoteAttachment == null ? 43 : this.quoteAttachment.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteOfferQuoteResponse.java new file mode 100644 index 0000000000..d31d71a8eb --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteOfferQuoteResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteOfferQuoteResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 DeleteOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(DeleteOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteOfferQuoteResponse build() { + return new DeleteOfferQuoteResponse( + __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 DeleteOfferQuoteResponse)) { + return false; + } + + DeleteOfferQuoteResponse other = (DeleteOfferQuoteResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteQuoteAttachmentResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteQuoteAttachmentResponse.java new file mode 100644 index 0000000000..e647e7b6fc --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/DeleteQuoteAttachmentResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class DeleteQuoteAttachmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 DeleteQuoteAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(DeleteQuoteAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteQuoteAttachmentResponse build() { + return new DeleteQuoteAttachmentResponse( + __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 DeleteQuoteAttachmentResponse)) { + return false; + } + + DeleteQuoteAttachmentResponse other = (DeleteQuoteAttachmentResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteInternalDetailResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteInternalDetailResponse.java new file mode 100644 index 0000000000..0ad0e09da7 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteInternalDetailResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteInternalDetailResponse 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 OfferQuoteInternalDetail instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteInternalDetail + offerQuoteInternalDetail; + + /** + * The returned OfferQuoteInternalDetail instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteInternalDetail + getOfferQuoteInternalDetail() { + return offerQuoteInternalDetail; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "offerQuoteInternalDetail" + }) + private GetOfferQuoteInternalDetailResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteInternalDetail + offerQuoteInternalDetail) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.offerQuoteInternalDetail = offerQuoteInternalDetail; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 OfferQuoteInternalDetail instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteInternalDetail + offerQuoteInternalDetail; + + /** + * The returned OfferQuoteInternalDetail instance. + * @param offerQuoteInternalDetail the value to set + * @return this builder + */ + public Builder offerQuoteInternalDetail( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteInternalDetail + offerQuoteInternalDetail) { + this.offerQuoteInternalDetail = offerQuoteInternalDetail; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOfferQuoteInternalDetailResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + offerQuoteInternalDetail(o.getOfferQuoteInternalDetail()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetOfferQuoteInternalDetailResponse build() { + return new GetOfferQuoteInternalDetailResponse( + __httpStatusCode__, headers, etag, opcRequestId, offerQuoteInternalDetail); + } + } + + /** + * 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(",offerQuoteInternalDetail=").append(String.valueOf(offerQuoteInternalDetail)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOfferQuoteInternalDetailResponse)) { + return false; + } + + GetOfferQuoteInternalDetailResponse other = (GetOfferQuoteInternalDetailResponse) 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.offerQuoteInternalDetail, other.offerQuoteInternalDetail); + } + + @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.offerQuoteInternalDetail == null + ? 43 + : this.offerQuoteInternalDetail.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteResponse.java new file mode 100644 index 0000000000..8b1e316d40 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetOfferQuoteResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetOfferQuoteResponse 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 OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote getOfferQuote() { + return offerQuote; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "offerQuote" + }) + private GetOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.offerQuote = offerQuote; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @param offerQuote the value to set + * @return this builder + */ + public Builder offerQuote( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + this.offerQuote = offerQuote; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + offerQuote(o.getOfferQuote()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetOfferQuoteResponse build() { + return new GetOfferQuoteResponse( + __httpStatusCode__, headers, etag, opcRequestId, offerQuote); + } + } + + /** + * 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(",offerQuote=").append(String.valueOf(offerQuote)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOfferQuoteResponse)) { + return false; + } + + GetOfferQuoteResponse other = (GetOfferQuoteResponse) 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.offerQuote, other.offerQuote); + } + + @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.offerQuote == null ? 43 : this.offerQuote.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentContentResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentContentResponse.java new file mode 100644 index 0000000000..957112e56b --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentContentResponse.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentContentResponse 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 returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "inputStream" + }) + private GetQuoteAttachmentContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetQuoteAttachmentContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetQuoteAttachmentContentResponse build() { + return new GetQuoteAttachmentContentResponse( + __httpStatusCode__, headers, opcRequestId, inputStream); + } + } + + /** + * 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(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetQuoteAttachmentContentResponse)) { + return false; + } + + GetQuoteAttachmentContentResponse other = (GetQuoteAttachmentContentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @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.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentResponse.java new file mode 100644 index 0000000000..590e476812 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/GetQuoteAttachmentResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class GetQuoteAttachmentResponse 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 QuoteAttachment instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment; + + /** + * The returned QuoteAttachment instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment getQuoteAttachment() { + return quoteAttachment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "quoteAttachment" + }) + private GetQuoteAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.quoteAttachment = quoteAttachment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 QuoteAttachment instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment; + + /** + * The returned QuoteAttachment instance. + * @param quoteAttachment the value to set + * @return this builder + */ + public Builder quoteAttachment( + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachment quoteAttachment) { + this.quoteAttachment = quoteAttachment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetQuoteAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + quoteAttachment(o.getQuoteAttachment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetQuoteAttachmentResponse build() { + return new GetQuoteAttachmentResponse( + __httpStatusCode__, headers, etag, opcRequestId, quoteAttachment); + } + } + + /** + * 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(",quoteAttachment=").append(String.valueOf(quoteAttachment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetQuoteAttachmentResponse)) { + return false; + } + + GetQuoteAttachmentResponse other = (GetQuoteAttachmentResponse) 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.quoteAttachment, other.quoteAttachment); + } + + @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.quoteAttachment == null ? 43 : this.quoteAttachment.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListOfferQuotesResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListOfferQuotesResponse.java new file mode 100644 index 0000000000..9a84e1f565 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListOfferQuotesResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListOfferQuotesResponse 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; + } + + /** + * The returned OfferQuoteCollection instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteCollection offerQuoteCollection; + + /** + * The returned OfferQuoteCollection instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteCollection + getOfferQuoteCollection() { + return offerQuoteCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "offerQuoteCollection" + }) + private ListOfferQuotesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteCollection + offerQuoteCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.offerQuoteCollection = offerQuoteCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned OfferQuoteCollection instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteCollection + offerQuoteCollection; + + /** + * The returned OfferQuoteCollection instance. + * @param offerQuoteCollection the value to set + * @return this builder + */ + public Builder offerQuoteCollection( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuoteCollection + offerQuoteCollection) { + this.offerQuoteCollection = offerQuoteCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOfferQuotesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + offerQuoteCollection(o.getOfferQuoteCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOfferQuotesResponse build() { + return new ListOfferQuotesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, offerQuoteCollection); + } + } + + /** + * 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(",offerQuoteCollection=").append(String.valueOf(offerQuoteCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOfferQuotesResponse)) { + return false; + } + + ListOfferQuotesResponse other = (ListOfferQuotesResponse) 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.offerQuoteCollection, other.offerQuoteCollection); + } + + @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.offerQuoteCollection == null + ? 43 + : this.offerQuoteCollection.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListQuoteAttachmentsResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListQuoteAttachmentsResponse.java new file mode 100644 index 0000000000..4402ad1ae9 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/ListQuoteAttachmentsResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class ListQuoteAttachmentsResponse 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; + } + + /** + * The returned QuoteAttachmentCollection instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentCollection + quoteAttachmentCollection; + + /** + * The returned QuoteAttachmentCollection instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentCollection + getQuoteAttachmentCollection() { + return quoteAttachmentCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "quoteAttachmentCollection" + }) + private ListQuoteAttachmentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentCollection + quoteAttachmentCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.quoteAttachmentCollection = quoteAttachmentCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * The returned QuoteAttachmentCollection instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentCollection + quoteAttachmentCollection; + + /** + * The returned QuoteAttachmentCollection instance. + * @param quoteAttachmentCollection the value to set + * @return this builder + */ + public Builder quoteAttachmentCollection( + com.oracle.bmc.marketplaceprivateoffer.model.QuoteAttachmentCollection + quoteAttachmentCollection) { + this.quoteAttachmentCollection = quoteAttachmentCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListQuoteAttachmentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + quoteAttachmentCollection(o.getQuoteAttachmentCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListQuoteAttachmentsResponse build() { + return new ListQuoteAttachmentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + quoteAttachmentCollection); + } + } + + /** + * 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(",quoteAttachmentCollection=").append(String.valueOf(quoteAttachmentCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListQuoteAttachmentsResponse)) { + return false; + } + + ListQuoteAttachmentsResponse other = (ListQuoteAttachmentsResponse) 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.quoteAttachmentCollection, other.quoteAttachmentCollection); + } + + @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.quoteAttachmentCollection == null + ? 43 + : this.quoteAttachmentCollection.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/RespondToOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/RespondToOfferQuoteResponse.java new file mode 100644 index 0000000000..5dc53cf865 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/RespondToOfferQuoteResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class RespondToOfferQuoteResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 RespondToOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(RespondToOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RespondToOfferQuoteResponse build() { + return new RespondToOfferQuoteResponse( + __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 RespondToOfferQuoteResponse)) { + return false; + } + + RespondToOfferQuoteResponse other = (RespondToOfferQuoteResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferQuoteResponse.java new file mode 100644 index 0000000000..afb308b25a --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferQuoteResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferQuoteResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 SendOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(SendOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SendOfferQuoteResponse build() { + return new SendOfferQuoteResponse( + __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 SendOfferQuoteResponse)) { + return false; + } + + SendOfferQuoteResponse other = (SendOfferQuoteResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferResponse.java new file mode 100644 index 0000000000..8a89d5b750 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/SendOfferResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class SendOfferResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 SendOfferResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(SendOfferResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SendOfferResponse build() { + return new SendOfferResponse( + __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 SendOfferResponse)) { + return false; + } + + SendOfferResponse other = (SendOfferResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/UpdateOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/UpdateOfferQuoteResponse.java new file mode 100644 index 0000000000..f719cae780 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/UpdateOfferQuoteResponse.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class UpdateOfferQuoteResponse 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; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @return the value + */ + public com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote getOfferQuote() { + return offerQuote; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "offerQuote" + }) + private UpdateOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.offerQuote = offerQuote; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * The returned OfferQuote instance. + */ + private com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote; + + /** + * The returned OfferQuote instance. + * @param offerQuote the value to set + * @return this builder + */ + public Builder offerQuote( + com.oracle.bmc.marketplaceprivateoffer.model.OfferQuote offerQuote) { + this.offerQuote = offerQuote; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + offerQuote(o.getOfferQuote()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateOfferQuoteResponse build() { + return new UpdateOfferQuoteResponse( + __httpStatusCode__, headers, etag, opcRequestId, opcWorkRequestId, offerQuote); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",offerQuote=").append(String.valueOf(offerQuote)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOfferQuoteResponse)) { + return false; + } + + UpdateOfferQuoteResponse other = (UpdateOfferQuoteResponse) 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.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.offerQuote, other.offerQuote); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.offerQuote == null ? 43 : this.offerQuote.hashCode()); + return result; + } +} diff --git a/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferQuoteResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferQuoteResponse.java new file mode 100644 index 0000000000..4573c60007 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferQuoteResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferQuoteResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 WithdrawOfferQuoteResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(WithdrawOfferQuoteResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public WithdrawOfferQuoteResponse build() { + return new WithdrawOfferQuoteResponse( + __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 WithdrawOfferQuoteResponse)) { + return false; + } + + WithdrawOfferQuoteResponse other = (WithdrawOfferQuoteResponse) 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-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferResponse.java b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferResponse.java new file mode 100644 index 0000000000..5ac59887f4 --- /dev/null +++ b/bmc-marketplaceprivateoffer/src/main/java/com/oracle/bmc/marketplaceprivateoffer/responses/WithdrawOfferResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.marketplaceprivateoffer.responses; + +import com.oracle.bmc.marketplaceprivateoffer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220901") +public class WithdrawOfferResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 WithdrawOfferResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @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 + */ + public Builder copy(WithdrawOfferResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public WithdrawOfferResponse build() { + return new WithdrawOfferResponse( + __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 WithdrawOfferResponse)) { + return false; + } + + WithdrawOfferResponse other = (WithdrawOfferResponse) 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-marketplacepublisher/pom.xml b/bmc-marketplacepublisher/pom.xml index 37f7f7b4d1..25f6ab83ce 100644 --- a/bmc-marketplacepublisher/pom.xml +++ b/bmc-marketplacepublisher/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-marketplacepublisher @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-mediaservices/pom.xml b/bmc-mediaservices/pom.xml index 7086c3d293..0143e30798 100644 --- a/bmc-mediaservices/pom.xml +++ b/bmc-mediaservices/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-mediaservices @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-mngdmac/pom.xml b/bmc-mngdmac/pom.xml index 15c620c409..e1cc7a001a 100644 --- a/bmc-mngdmac/pom.xml +++ b/bmc-mngdmac/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-mngdmac @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-modeldeployment/pom.xml b/bmc-modeldeployment/pom.xml index fa90181bc9..938ca85531 100644 --- a/bmc-modeldeployment/pom.xml +++ b/bmc-modeldeployment/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-modeldeployment @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-monitoring/pom.xml b/bmc-monitoring/pom.xml index f3fbdb25d5..357355d554 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-monitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-multicloud/pom.xml b/bmc-multicloud/pom.xml index 50cc617fb9..70ef2b2b31 100644 --- a/bmc-multicloud/pom.xml +++ b/bmc-multicloud/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-multicloud @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-mysql/pom.xml b/bmc-mysql/pom.xml index a26bc9ad61..78f0dc1c61 100644 --- a/bmc-mysql/pom.xml +++ b/bmc-mysql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-mysql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-networkfirewall/pom.xml b/bmc-networkfirewall/pom.xml index ead68569a4..2d770c62f5 100644 --- a/bmc-networkfirewall/pom.xml +++ b/bmc-networkfirewall/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-networkfirewall @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-networkloadbalancer/pom.xml b/bmc-networkloadbalancer/pom.xml index 0cb541fabd..71891365ff 100644 --- a/bmc-networkloadbalancer/pom.xml +++ b/bmc-networkloadbalancer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-networkloadbalancer @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-nosql/pom.xml b/bmc-nosql/pom.xml index 65335bf6bf..f374a65baa 100644 --- a/bmc-nosql/pom.xml +++ b/bmc-nosql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-nosql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index 73ed4b25de..c3f2a129af 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 - 2.95.0 + 2.97.0 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.95.0 + 2.97.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index d5c795fc93..e424272d51 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 - 2.95.0 + 2.97.0 ../pom.xml @@ -28,12 +28,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.95.0 + 2.97.0 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 425761ea0b..ae1683323a 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 - 2.95.0 + 2.97.0 ../pom.xml @@ -20,7 +20,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index e9f952eb1a..51ac65ba88 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -62,6 +62,13 @@ public interface ObjectStorage extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Determines whether dual stack endpoint should be used or not. + * Set dualStackEndpointTemplateEnabled to "true" if the user wants to enable use of dual stack endpoint template. Default value is "false" + * @param dualStackEndpointTemplateEnabled flag to enable the use of dual stack endpoint template + */ + void enableDualStackEndpoints(boolean dualStackEndpointTemplateEnabled); + /** * Aborts an in-progress multipart upload and deletes all parts that have been uploaded. * diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index 16f69405e8..bf8b82390b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -61,6 +61,13 @@ public interface ObjectStorageAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Determines whether dual stack endpoint should be used or not. + * Set dualStackEndpointTemplateEnabled to "true" if the user wants to enable use of dual stack endpoint template. Default value is "false" + * @param dualStackEndpointTemplateEnabled flag to enable the use of dual stack endpoint template + */ + void enableDualStackEndpoints(boolean dualStackEndpointTemplateEnabled); + /** * Aborts an in-progress multipart upload and deletes all parts that have been uploaded. * diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java index 28f285549d..956c04e7ca 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java @@ -32,10 +32,11 @@ public class ObjectStorageAsyncClient implements ObjectStorageAsync { com.oracle.bmc.Services.serviceBuilder() .serviceName(ObjectStorageClient.class.getName()) .serviceEndpointPrefix("objectstorage") - .serviceEndpointTemplate("https://objectstorage.{region}.{secondLevelDomain}") + .serviceEndpointTemplate( + "https://objectstorage.{region}.{dualStack?ds.oci.:}{secondLevelDomain}") .addServiceEndpointTemplateForRealm( "oc1", - "https://{namespaceName+Dot}objectstorage.{region}.oci.customer-oci.com") + "https://{namespaceName+Dot}objectstorage.{region}.{dualStack?ds.:}oci.customer-oci.com") .endpointServiceName("objectstorage") .build(); @@ -56,6 +57,7 @@ public class ObjectStorageAsyncClient implements ObjectStorageAsync { private final boolean isNonBufferingApacheClient; private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; private String regionId; + private final java.util.Map optionsMap = new java.util.HashMap<>(); // This pattern matches substrings that are enclosed within curly braces {} private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = @@ -310,6 +312,9 @@ public ObjectStorageAsyncClient( } } } + enableDualStackEndpoints( + com.oracle.bmc.util.internal.EndpointTemplateForOptionsUtils + .isDualStackEnabledForClientDefault(SERVICE)); if (endpoint != null) { setEndpoint(endpoint); } @@ -475,6 +480,14 @@ public synchronized void useRealmSpecificEndpointTemplate( useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); } + @Override + public synchronized void enableDualStackEndpoints(boolean dualStackEndpointTemplateEnabled) { + optionsMap.put( + com.oracle.bmc.util.internal.EndpointTemplateForOptionsUtils.DUAL_STACK_OPTION, + dualStackEndpointTemplateEnabled); + client.setOptionsMap(optionsMap); + } + @Override public void close() { client.close(); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java index f7267229e2..1a90b11698 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java @@ -20,10 +20,11 @@ public class ObjectStorageClient implements ObjectStorage { com.oracle.bmc.Services.serviceBuilder() .serviceName(ObjectStorageClient.class.getName()) .serviceEndpointPrefix("objectstorage") - .serviceEndpointTemplate("https://objectstorage.{region}.{secondLevelDomain}") + .serviceEndpointTemplate( + "https://objectstorage.{region}.{dualStack?ds.oci.:}{secondLevelDomain}") .addServiceEndpointTemplateForRealm( "oc1", - "https://{namespaceName+Dot}objectstorage.{region}.oci.customer-oci.com") + "https://{namespaceName+Dot}objectstorage.{region}.{dualStack?ds.:}oci.customer-oci.com") .endpointServiceName("objectstorage") .build(); // attempt twice if it's instance principals, immediately failures will try to refresh the token @@ -55,6 +56,7 @@ com.oracle.bmc.http.internal.RestClient getClient() { private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration circuitBreakerConfiguration; private String regionId; + private final java.util.Map optionsMap = new java.util.HashMap<>(); // This pattern matches substrings that are enclosed within curly braces {} private static final Pattern PATTERN_FOR_SUBSTRINGS_IN_CURLY_BRACES = @@ -387,6 +389,9 @@ protected ObjectStorageClient( } } } + enableDualStackEndpoints( + com.oracle.bmc.util.internal.EndpointTemplateForOptionsUtils + .isDualStackEnabledForClientDefault(SERVICE)); if (endpoint != null) { setEndpoint(endpoint); } @@ -564,6 +569,14 @@ public synchronized void useRealmSpecificEndpointTemplate( useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); } + @Override + public synchronized void enableDualStackEndpoints(boolean dualStackEndpointTemplateEnabled) { + optionsMap.put( + com.oracle.bmc.util.internal.EndpointTemplateForOptionsUtils.DUAL_STACK_OPTION, + dualStackEndpointTemplateEnabled); + client.setOptionsMap(optionsMap); + } + @Override public void close() { client.close(); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java index 75bb7e2760..7581cec9df 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java @@ -535,22 +535,22 @@ public Builder autoTiering(AutoTiering autoTiering) { return this; } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @param bucketScope the value to set * @return this builder @@ -1277,11 +1277,11 @@ public AutoTiering getAutoTiering() { } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ public enum BucketScope { @@ -1330,22 +1330,22 @@ public static BucketScope create(String key) { } }; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private final BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @return the value **/ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java index ba8dd3b80d..d7d9f51ec0 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java @@ -203,22 +203,22 @@ public Builder definedTags( return this; } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @param bucketScope the value to set * @return this builder @@ -423,22 +423,22 @@ public java.util.Map> getDefinedTags() { } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private final Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @return the value **/ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java index 127c51be09..6102631ffe 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java @@ -327,22 +327,22 @@ public Builder autoTiering(Bucket.AutoTiering autoTiering) { return this; } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @param bucketScope the value to set * @return this builder @@ -781,22 +781,22 @@ public Bucket.AutoTiering getAutoTiering() { } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketScope") private final Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. * * @return the value **/ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java index 0b656bfae1..afd13027de 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java @@ -323,11 +323,12 @@ public Builder autoTiering(Bucket.AutoTiering autoTiering) { return this; } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. + *

* BucketScope can only be updated from NAMESPACE to REGION, it cannot be updated from REGION to NAMESPACE. * Updating bucket scope is possible only if the bucket name is valid and there is no existing regionally unique * bucket with the same name. @@ -337,11 +338,12 @@ public Builder autoTiering(Bucket.AutoTiering autoTiering) { private Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. + *

* BucketScope can only be updated from NAMESPACE to REGION, it cannot be updated from REGION to NAMESPACE. * Updating bucket scope is possible only if the bucket name is valid and there is no existing regionally unique * bucket with the same name. @@ -741,11 +743,12 @@ public Bucket.AutoTiering getAutoTiering() { } /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. + *

* BucketScope can only be updated from NAMESPACE to REGION, it cannot be updated from REGION to NAMESPACE. * Updating bucket scope is possible only if the bucket name is valid and there is no existing regionally unique * bucket with the same name. @@ -755,11 +758,12 @@ public Bucket.AutoTiering getAutoTiering() { private final Bucket.BucketScope bucketScope; /** - * Scope in which the bucket is unique. Default value is NAMESPACE. - * Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other - * tenancies can have a bucket with same name in their namespace. - * Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with - * same name and scope REGION. + * The bucket scope determines weather the bucket name must be unique within the tenancy and region (essentially the namespace) or across all tenancies in the region. The bucket scope also determines if the bucket supports S3 virtual-hosted style URL's or not. + *

+ * Allowed values: + * NAMESPACE: Only supports path-style bucket access, bucket name only needs to be unique within the tenancy and region. + * REGION: Supports both path-style and virtual-hosted URL style access, bucket name needs to be unique across all tenancies in the region. + *

* BucketScope can only be updated from NAMESPACE to REGION, it cannot be updated from REGION to NAMESPACE. * Updating bucket scope is possible only if the bucket name is valid and there is no existing regionally unique * bucket with the same name. diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java index a55300aee3..25fea2d9fd 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java @@ -256,18 +256,20 @@ public String getOpcContentSha384() { } /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to - * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect - * on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, - * you could use this header to identify and perform special operations on text only objects. + * 'application/octet-stream' if not specified in the PutObject call. In the OCI CLI, you can set this value to 'auto' + * to have the CLI infer the content type from the file name. Specifying values for this header has no effect on Object + * Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you + * could use this header to identify and perform special operations on text only objects. * */ private String contentType; /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to - * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect - * on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, - * you could use this header to identify and perform special operations on text only objects. + * 'application/octet-stream' if not specified in the PutObject call. In the OCI CLI, you can set this value to 'auto' + * to have the CLI infer the content type from the file name. Specifying values for this header has no effect on Object + * Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you + * could use this header to identify and perform special operations on text only objects. * */ public String getContentType() { @@ -765,18 +767,20 @@ public Builder opcContentSha384(String opcContentSha384) { /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to - * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect - * on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, - * you could use this header to identify and perform special operations on text only objects. + * 'application/octet-stream' if not specified in the PutObject call. In the OCI CLI, you can set this value to 'auto' + * to have the CLI infer the content type from the file name. Specifying values for this header has no effect on Object + * Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you + * could use this header to identify and perform special operations on text only objects. * */ private String contentType = null; /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to - * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect - * on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, - * you could use this header to identify and perform special operations on text only objects. + * 'application/octet-stream' if not specified in the PutObject call. In the OCI CLI, you can set this value to 'auto' + * to have the CLI infer the content type from the file name. Specifying values for this header has no effect on Object + * Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you + * could use this header to identify and perform special operations on text only objects. * * @param contentType the value to set * @return this builder instance diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 98f6bc2a82..ee549493f9 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml diff --git a/bmc-oce/pom.xml b/bmc-oce/pom.xml index 1620634efb..f4c91b03a8 100644 --- a/bmc-oce/pom.xml +++ b/bmc-oce/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-oce @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-ocicontrolcenter/pom.xml b/bmc-ocicontrolcenter/pom.xml index 0b7bae927b..700dac635b 100644 --- a/bmc-ocicontrolcenter/pom.xml +++ b/bmc-ocicontrolcenter/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-ocicontrolcenter @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-ocvp/pom.xml b/bmc-ocvp/pom.xml index b504c481b6..3276826354 100644 --- a/bmc-ocvp/pom.xml +++ b/bmc-ocvp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-ocvp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-oda/pom.xml b/bmc-oda/pom.xml index 3af8391317..13691fd62f 100644 --- a/bmc-oda/pom.xml +++ b/bmc-oda/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-oda @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-onesubscription/pom.xml b/bmc-onesubscription/pom.xml index ae818928be..775b2476e8 100644 --- a/bmc-onesubscription/pom.xml +++ b/bmc-onesubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-onesubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index 7f59507868..7b86dd3264 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-ons @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-opa/pom.xml b/bmc-opa/pom.xml index a6730920a0..0993cd622b 100644 --- a/bmc-opa/pom.xml +++ b/bmc-opa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-opa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-opensearch/pom.xml b/bmc-opensearch/pom.xml index fd94365257..27a6e7d165 100644 --- a/bmc-opensearch/pom.xml +++ b/bmc-opensearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-opensearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterDetails.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterDetails.java index f95e572e2a..f91bfa1304 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterDetails.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterDetails.java @@ -32,6 +32,7 @@ public final class UpdateOpensearchClusterDetails "securityMasterUserPasswordHash", "securitySamlConfig", "backupPolicy", + "nsgId", "reverseConnectionEndpointCustomerIps", "outboundClusterConfig", "maintenanceDetails", @@ -49,6 +50,7 @@ public UpdateOpensearchClusterDetails( String securityMasterUserPasswordHash, SecuritySamlConfig securitySamlConfig, BackupPolicy backupPolicy, + String nsgId, java.util.List reverseConnectionEndpointCustomerIps, OutboundClusterConfig outboundClusterConfig, UpdateMaintenanceDetails maintenanceDetails, @@ -65,6 +67,7 @@ public UpdateOpensearchClusterDetails( this.securityMasterUserPasswordHash = securityMasterUserPasswordHash; this.securitySamlConfig = securitySamlConfig; this.backupPolicy = backupPolicy; + this.nsgId = nsgId; this.reverseConnectionEndpointCustomerIps = reverseConnectionEndpointCustomerIps; this.outboundClusterConfig = outboundClusterConfig; this.maintenanceDetails = maintenanceDetails; @@ -168,6 +171,22 @@ public Builder backupPolicy(BackupPolicy backupPolicy) { this.__explicitlySet__.add("backupPolicy"); return this; } + /** + * The OCID of the NSG where the private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private String nsgId; + + /** + * The OCID of the NSG where the private endpoint vnic will be attached. + * @param nsgId the value to set + * @return this builder + **/ + public Builder nsgId(String nsgId) { + this.nsgId = nsgId; + this.__explicitlySet__.add("nsgId"); + return this; + } /** * The customer IP addresses of the endpoint in customer VCN **/ @@ -301,6 +320,7 @@ public UpdateOpensearchClusterDetails build() { this.securityMasterUserPasswordHash, this.securitySamlConfig, this.backupPolicy, + this.nsgId, this.reverseConnectionEndpointCustomerIps, this.outboundClusterConfig, this.maintenanceDetails, @@ -338,6 +358,9 @@ public Builder copy(UpdateOpensearchClusterDetails model) { if (model.wasPropertyExplicitlySet("backupPolicy")) { this.backupPolicy(model.getBackupPolicy()); } + if (model.wasPropertyExplicitlySet("nsgId")) { + this.nsgId(model.getNsgId()); + } if (model.wasPropertyExplicitlySet("reverseConnectionEndpointCustomerIps")) { this.reverseConnectionEndpointCustomerIps( model.getReverseConnectionEndpointCustomerIps()); @@ -455,6 +478,20 @@ public BackupPolicy getBackupPolicy() { return backupPolicy; } + /** + * The OCID of the NSG where the private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private final String nsgId; + + /** + * The OCID of the NSG where the private endpoint vnic will be attached. + * @return the value + **/ + public String getNsgId() { + return nsgId; + } + /** * The customer IP addresses of the endpoint in customer VCN **/ @@ -577,6 +614,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.securityMasterUserPasswordHash)); sb.append(", securitySamlConfig=").append(String.valueOf(this.securitySamlConfig)); sb.append(", backupPolicy=").append(String.valueOf(this.backupPolicy)); + sb.append(", nsgId=").append(String.valueOf(this.nsgId)); sb.append(", reverseConnectionEndpointCustomerIps=") .append(String.valueOf(this.reverseConnectionEndpointCustomerIps)); sb.append(", outboundClusterConfig=").append(String.valueOf(this.outboundClusterConfig)); @@ -609,6 +647,7 @@ public boolean equals(Object o) { this.securityMasterUserPasswordHash, other.securityMasterUserPasswordHash) && java.util.Objects.equals(this.securitySamlConfig, other.securitySamlConfig) && java.util.Objects.equals(this.backupPolicy, other.backupPolicy) + && java.util.Objects.equals(this.nsgId, other.nsgId) && java.util.Objects.equals( this.reverseConnectionEndpointCustomerIps, other.reverseConnectionEndpointCustomerIps) @@ -647,6 +686,7 @@ public int hashCode() { ? 43 : this.securitySamlConfig.hashCode()); result = (result * PRIME) + (this.backupPolicy == null ? 43 : this.backupPolicy.hashCode()); + result = (result * PRIME) + (this.nsgId == null ? 43 : this.nsgId.hashCode()); result = (result * PRIME) + (this.reverseConnectionEndpointCustomerIps == null diff --git a/bmc-operatoraccesscontrol/pom.xml b/bmc-operatoraccesscontrol/pom.xml index 5c1235bfb3..225e1c4bcd 100644 --- a/bmc-operatoraccesscontrol/pom.xml +++ b/bmc-operatoraccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-operatoraccesscontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-opsi/pom.xml b/bmc-opsi/pom.xml index 4e409fa2fe..0653e07888 100644 --- a/bmc-opsi/pom.xml +++ b/bmc-opsi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-opsi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-optimizer/pom.xml b/bmc-optimizer/pom.xml index 529714d08a..4355c948ca 100644 --- a/bmc-optimizer/pom.xml +++ b/bmc-optimizer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-optimizer @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-osmanagementhub/pom.xml b/bmc-osmanagementhub/pom.xml index 56256c63f8..4ac5db0f67 100644 --- a/bmc-osmanagementhub/pom.xml +++ b/bmc-osmanagementhub/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-osmanagementhub @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-ospgateway/pom.xml b/bmc-ospgateway/pom.xml index 3333bdb90f..d4870a3f69 100644 --- a/bmc-ospgateway/pom.xml +++ b/bmc-ospgateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-ospgateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-osubbillingschedule/pom.xml b/bmc-osubbillingschedule/pom.xml index ed3fbc1c10..af2a5462d3 100644 --- a/bmc-osubbillingschedule/pom.xml +++ b/bmc-osubbillingschedule/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-osubbillingschedule @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-osuborganizationsubscription/pom.xml b/bmc-osuborganizationsubscription/pom.xml index cea96f8700..8739225d57 100644 --- a/bmc-osuborganizationsubscription/pom.xml +++ b/bmc-osuborganizationsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-osuborganizationsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-osubsubscription/pom.xml b/bmc-osubsubscription/pom.xml index e66b7f126d..60539f851f 100644 --- a/bmc-osubsubscription/pom.xml +++ b/bmc-osubsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-osubsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-osubusage/pom.xml b/bmc-osubusage/pom.xml index 8183c02c5d..5b585c34d6 100644 --- a/bmc-osubusage/pom.xml +++ b/bmc-osubusage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-osubusage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-psa/pom.xml b/bmc-psa/pom.xml index 35c620bde6..665fdf408d 100644 --- a/bmc-psa/pom.xml +++ b/bmc-psa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-psa @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-psql/pom.xml b/bmc-psql/pom.xml index ccc554d5d0..fa856a5701 100644 --- a/bmc-psql/pom.xml +++ b/bmc-psql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-psql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-queue/pom.xml b/bmc-queue/pom.xml index 5eab4401a5..4aa9675e8b 100644 --- a/bmc-queue/pom.xml +++ b/bmc-queue/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-queue @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-recovery/pom.xml b/bmc-recovery/pom.xml index 3e7bda64ee..7fdb3e2712 100644 --- a/bmc-recovery/pom.xml +++ b/bmc-recovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-recovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-redis/pom.xml b/bmc-redis/pom.xml index b45b237fcc..b79b56027d 100644 --- a/bmc-redis/pom.xml +++ b/bmc-redis/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-redis @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-resourceanalytics/pom.xml b/bmc-resourceanalytics/pom.xml index 46052f97c3..6b9c17fd00 100644 --- a/bmc-resourceanalytics/pom.xml +++ b/bmc-resourceanalytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-resourceanalytics @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index 5e0f070f3c..ed56dbb2b8 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-resourcemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManager.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManager.java index aaa01755a9..0186fb08c3 100644 --- a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManager.java +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManager.java @@ -567,6 +567,35 @@ GetJobDetailedLogContentResponse getJobDetailedLogContent( */ GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + /** + * Returns console log entries for the specified work request in JSON format. + * + * @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 GetWorkRequestLogEntries API. + */ + GetWorkRequestLogEntriesResponse getWorkRequestLogEntries( + GetWorkRequestLogEntriesRequest request); + + /** + * Returns the raw log file for the specified work request in text format. + * The file includes a maximum of 100,000 log entries. + * + * @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 GetWorkRequestLogEntriesContent API. + */ + GetWorkRequestLogEntriesContentResponse getWorkRequestLogEntriesContent( + GetWorkRequestLogEntriesContentRequest request); + /** * Lists configuration source providers according to the specified filter. * For more information, see diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsync.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsync.java index 2b1c92eb16..4949528c06 100644 --- a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsync.java +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsync.java @@ -669,6 +669,43 @@ java.util.concurrent.Future getWorkRequest( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns console log entries for the specified work request in JSON format. + * + * + * @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 getWorkRequestLogEntries( + GetWorkRequestLogEntriesRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesRequest, GetWorkRequestLogEntriesResponse> + handler); + + /** + * Returns the raw log file for the specified work request in text format. + * The file includes a maximum of 100,000 log entries. + * + * + * @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 + getWorkRequestLogEntriesContent( + GetWorkRequestLogEntriesContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesContentRequest, + GetWorkRequestLogEntriesContentResponse> + handler); + /** * Lists configuration source providers according to the specified filter. * For more information, see diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsyncClient.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsyncClient.java index 17f15e18e5..c42efee0e6 100644 --- a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsyncClient.java +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerAsyncClient.java @@ -2018,6 +2018,107 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getWorkRequestLogEntries( + GetWorkRequestLogEntriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesRequest, GetWorkRequestLogEntriesResponse> + handler) { + LOG.trace("Called async getWorkRequestLogEntries"); + final GetWorkRequestLogEntriesRequest interceptedRequest = + GetWorkRequestLogEntriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestLogEntriesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ResourceManager", + "GetWorkRequestLogEntries", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/resourcemanager/20180917/WorkRequest/GetWorkRequestLogEntries"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetWorkRequestLogEntriesResponse> + transformer = + GetWorkRequestLogEntriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesRequest, GetWorkRequestLogEntriesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesRequest, GetWorkRequestLogEntriesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestLogEntriesRequest, GetWorkRequestLogEntriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getWorkRequestLogEntriesContent( + GetWorkRequestLogEntriesContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesContentRequest, + GetWorkRequestLogEntriesContentResponse> + handler) { + LOG.trace("Called async getWorkRequestLogEntriesContent"); + final GetWorkRequestLogEntriesContentRequest interceptedRequest = + GetWorkRequestLogEntriesContentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestLogEntriesContentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ResourceManager", + "GetWorkRequestLogEntriesContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/resourcemanager/20180917/WorkRequest/GetWorkRequestLogEntriesContent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetWorkRequestLogEntriesContentResponse> + transformer = + GetWorkRequestLogEntriesContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesContentRequest, + GetWorkRequestLogEntriesContentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestLogEntriesContentRequest, + GetWorkRequestLogEntriesContentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestLogEntriesContentRequest, + GetWorkRequestLogEntriesContentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listConfigurationSourceProviders( diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerClient.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerClient.java index e716fe46da..804cec6551 100644 --- a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerClient.java +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/ResourceManagerClient.java @@ -1791,6 +1791,83 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { }); } + @Override + public GetWorkRequestLogEntriesResponse getWorkRequestLogEntries( + GetWorkRequestLogEntriesRequest request) { + LOG.trace("Called getWorkRequestLogEntries"); + final GetWorkRequestLogEntriesRequest interceptedRequest = + GetWorkRequestLogEntriesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestLogEntriesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ResourceManager", + "GetWorkRequestLogEntries", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/resourcemanager/20180917/WorkRequest/GetWorkRequestLogEntries"); + java.util.function.Function + transformer = + GetWorkRequestLogEntriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetWorkRequestLogEntriesContentResponse getWorkRequestLogEntriesContent( + GetWorkRequestLogEntriesContentRequest request) { + LOG.trace("Called getWorkRequestLogEntriesContent"); + final GetWorkRequestLogEntriesContentRequest interceptedRequest = + GetWorkRequestLogEntriesContentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestLogEntriesContentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ResourceManager", + "GetWorkRequestLogEntriesContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/resourcemanager/20180917/WorkRequest/GetWorkRequestLogEntriesContent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetWorkRequestLogEntriesContentResponse> + transformer = + GetWorkRequestLogEntriesContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListConfigurationSourceProvidersResponse listConfigurationSourceProviders( ListConfigurationSourceProvidersRequest request) { diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesContentConverter.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesContentConverter.java new file mode 100644 index 0000000000..bc0738c2b5 --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesContentConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.resourcemanager.model.*; +import com.oracle.bmc.resourcemanager.requests.*; +import com.oracle.bmc.resourcemanager.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesContentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestLogEntriesContentConverter.class); + + public static com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesContentRequest + interceptRequest( + com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesContentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesContentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180917") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logEntries") + .path("content"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.TEXT_PLAIN); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse>() { + @Override + public com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.resourcemanager.responses.GetWorkRequestLogEntriesContentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + String.class, serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(String.class); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse.Builder + builder = + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.value(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesContentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesConverter.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesConverter.java new file mode 100644 index 0000000000..51fed1bfee --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/internal/http/GetWorkRequestLogEntriesConverter.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.resourcemanager.model.*; +import com.oracle.bmc.resourcemanager.requests.*; +import com.oracle.bmc.resourcemanager.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestLogEntriesConverter.class); + + public static com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesRequest + interceptRequest( + com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.resourcemanager.requests.GetWorkRequestLogEntriesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180917") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logEntries"); + + if (request.getType() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "type", + request.getType(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getLevelGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "levelGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLevelGreaterThanOrEqualTo().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getTimestampGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timestampGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimestampGreaterThanOrEqualTo())); + } + + if (request.getTimestampLessThanOrEqualTo() != null) { + target = + target.queryParam( + "timestampLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimestampLessThanOrEqualTo())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses.GetWorkRequestLogEntriesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses.GetWorkRequestLogEntriesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses.GetWorkRequestLogEntriesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesResponse>() { + @Override + public com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.resourcemanager.responses.GetWorkRequestLogEntriesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.resourcemanager.model + .LogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.resourcemanager.model + .LogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.resourcemanager.model + .LogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.resourcemanager.model + .LogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesResponse.Builder + builder = + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.logEntryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.resourcemanager.responses + .GetWorkRequestLogEntriesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/model/LogEntryCollection.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/model/LogEntryCollection.java new file mode 100644 index 0000000000..fac31e4d45 --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/model/LogEntryCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.model; + +/** + * Collection of log entries. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LogEntryCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public LogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Collection of 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 LogEntryCollection build() { + LogEntryCollection model = new LogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LogEntryCollection 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); + } + + /** + * Collection of log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Collection of 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("LogEntryCollection("); + 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 LogEntryCollection)) { + return false; + } + + LogEntryCollection other = (LogEntryCollection) 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-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesContentRequest.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesContentRequest.java new file mode 100644 index 0000000000..37e193fdca --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesContentRequest.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.requests; + +import com.oracle.bmc.resourcemanager.model.*; +/** + * Example: Click here to see how to use GetWorkRequestLogEntriesContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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. + * + */ + 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. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestLogEntriesContentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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. + * + */ + 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. + * + * @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.util.internal.Consumer + 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(GetWorkRequestLogEntriesContentRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestLogEntriesContentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestLogEntriesContentRequest + */ + public GetWorkRequestLogEntriesContentRequest build() { + GetWorkRequestLogEntriesContentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestLogEntriesContentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestLogEntriesContentRequest + */ + public GetWorkRequestLogEntriesContentRequest buildWithoutInvocationCallback() { + GetWorkRequestLogEntriesContentRequest request = + new GetWorkRequestLogEntriesContentRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestLogEntriesContentRequest(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 GetWorkRequestLogEntriesContentRequest)) { + return false; + } + + GetWorkRequestLogEntriesContentRequest other = (GetWorkRequestLogEntriesContentRequest) 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-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesRequest.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesRequest.java new file mode 100644 index 0000000000..4785503f33 --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/requests/GetWorkRequestLogEntriesRequest.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.requests; + +import com.oracle.bmc.resourcemanager.model.*; +/** + * Example: Click here to see how to use GetWorkRequestLogEntriesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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. + * + */ + 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. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter that returns only logs of a specified type. + * + */ + private java.util.List type; + + /** + * A filter that returns only logs of a specified type. + * + */ + public java.util.List getType() { + return type; + } + /** + * A filter that returns only log entries that match a given severity level or greater. + * + */ + private com.oracle.bmc.resourcemanager.model.LogEntry.Level levelGreaterThanOrEqualTo; + + /** + * A filter that returns only log entries that match a given severity level or greater. + * + */ + public com.oracle.bmc.resourcemanager.model.LogEntry.Level getLevelGreaterThanOrEqualTo() { + return levelGreaterThanOrEqualTo; + } + /** + * The sort order to use when sorting returned resources. Ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use when sorting returned resources. Ascending ({@code ASC}) or descending ({@code DESC}). + * + **/ + public enum SortOrder { + 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); + } + }; + + /** + * The sort order to use when sorting returned resources. Ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * The number of items returned in a paginated {@code List} call. For information about pagination, see + * [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * The number of items returned in a paginated {@code List} call. For information about pagination, see + * [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The value of the {@code opc-next-page} response header from the preceding {@code List} call. + * For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the preceding {@code List} call. + * For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * Time stamp specifying the lower time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-01-01T12:00:00.000Z} + * + */ + private java.util.Date timestampGreaterThanOrEqualTo; + + /** + * Time stamp specifying the lower time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-01-01T12:00:00.000Z} + * + */ + public java.util.Date getTimestampGreaterThanOrEqualTo() { + return timestampGreaterThanOrEqualTo; + } + /** + * Time stamp specifying the upper time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-02-01T12:00:00.000Z} + * + */ + private java.util.Date timestampLessThanOrEqualTo; + + /** + * Time stamp specifying the upper time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-02-01T12:00:00.000Z} + * + */ + public java.util.Date getTimestampLessThanOrEqualTo() { + return timestampLessThanOrEqualTo; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestLogEntriesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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. + * + */ + 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. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter that returns only logs of a specified type. + * + */ + private java.util.List type = null; + + /** + * A filter that returns only logs of a specified type. + * + * @param type the value to set + * @return this builder instance + */ + public Builder type( + java.util.List type) { + this.type = type; + return this; + } + + /** + * Singular setter. A filter that returns only logs of a specified type. + * + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder type(com.oracle.bmc.resourcemanager.model.LogEntry.Type singularValue) { + return this.type(java.util.Arrays.asList(singularValue)); + } + + /** + * A filter that returns only log entries that match a given severity level or greater. + * + */ + private com.oracle.bmc.resourcemanager.model.LogEntry.Level levelGreaterThanOrEqualTo = + null; + + /** + * A filter that returns only log entries that match a given severity level or greater. + * + * @param levelGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder levelGreaterThanOrEqualTo( + com.oracle.bmc.resourcemanager.model.LogEntry.Level levelGreaterThanOrEqualTo) { + this.levelGreaterThanOrEqualTo = levelGreaterThanOrEqualTo; + return this; + } + + /** + * The sort order to use when sorting returned resources. Ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use when sorting returned resources. Ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The number of items returned in a paginated {@code List} call. For information about pagination, see + * [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * The number of items returned in a paginated {@code List} call. For information about pagination, see + * [List Pagination](https://docs.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 value of the {@code opc-next-page} response header from the preceding {@code List} call. + * For information about pagination, see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the preceding {@code List} call. + * For information about pagination, see [List Pagination](https://docs.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; + } + + /** + * Time stamp specifying the lower time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-01-01T12:00:00.000Z} + * + */ + private java.util.Date timestampGreaterThanOrEqualTo = null; + + /** + * Time stamp specifying the lower time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-01-01T12:00:00.000Z} + * + * @param timestampGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timestampGreaterThanOrEqualTo(java.util.Date timestampGreaterThanOrEqualTo) { + this.timestampGreaterThanOrEqualTo = timestampGreaterThanOrEqualTo; + return this; + } + + /** + * Time stamp specifying the upper time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-02-01T12:00:00.000Z} + * + */ + private java.util.Date timestampLessThanOrEqualTo = null; + + /** + * Time stamp specifying the upper time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: {@code 2020-02-01T12:00:00.000Z} + * + * @param timestampLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timestampLessThanOrEqualTo(java.util.Date timestampLessThanOrEqualTo) { + this.timestampLessThanOrEqualTo = timestampLessThanOrEqualTo; + 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.util.internal.Consumer + 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(GetWorkRequestLogEntriesRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + type(o.getType()); + levelGreaterThanOrEqualTo(o.getLevelGreaterThanOrEqualTo()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + timestampGreaterThanOrEqualTo(o.getTimestampGreaterThanOrEqualTo()); + timestampLessThanOrEqualTo(o.getTimestampLessThanOrEqualTo()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestLogEntriesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestLogEntriesRequest + */ + public GetWorkRequestLogEntriesRequest build() { + GetWorkRequestLogEntriesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestLogEntriesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestLogEntriesRequest + */ + public GetWorkRequestLogEntriesRequest buildWithoutInvocationCallback() { + GetWorkRequestLogEntriesRequest request = new GetWorkRequestLogEntriesRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.type = type; + request.levelGreaterThanOrEqualTo = levelGreaterThanOrEqualTo; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.timestampGreaterThanOrEqualTo = timestampGreaterThanOrEqualTo; + request.timestampLessThanOrEqualTo = timestampLessThanOrEqualTo; + return request; + // new GetWorkRequestLogEntriesRequest(workRequestId, opcRequestId, type, levelGreaterThanOrEqualTo, sortOrder, limit, page, timestampGreaterThanOrEqualTo, timestampLessThanOrEqualTo); + } + } + + /** + * 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) + .type(type) + .levelGreaterThanOrEqualTo(levelGreaterThanOrEqualTo) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .timestampGreaterThanOrEqualTo(timestampGreaterThanOrEqualTo) + .timestampLessThanOrEqualTo(timestampLessThanOrEqualTo); + } + + /** + * 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(",type=").append(String.valueOf(this.type)); + sb.append(",levelGreaterThanOrEqualTo=") + .append(String.valueOf(this.levelGreaterThanOrEqualTo)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",timestampGreaterThanOrEqualTo=") + .append(String.valueOf(this.timestampGreaterThanOrEqualTo)); + sb.append(",timestampLessThanOrEqualTo=") + .append(String.valueOf(this.timestampLessThanOrEqualTo)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestLogEntriesRequest)) { + return false; + } + + GetWorkRequestLogEntriesRequest other = (GetWorkRequestLogEntriesRequest) 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.type, other.type) + && java.util.Objects.equals( + this.levelGreaterThanOrEqualTo, other.levelGreaterThanOrEqualTo) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals( + this.timestampGreaterThanOrEqualTo, other.timestampGreaterThanOrEqualTo) + && java.util.Objects.equals( + this.timestampLessThanOrEqualTo, other.timestampLessThanOrEqualTo); + } + + @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.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.levelGreaterThanOrEqualTo == null + ? 43 + : this.levelGreaterThanOrEqualTo.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.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.timestampGreaterThanOrEqualTo == null + ? 43 + : this.timestampGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timestampLessThanOrEqualTo == null + ? 43 + : this.timestampLessThanOrEqualTo.hashCode()); + return result; + } +} diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesContentResponse.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesContentResponse.java new file mode 100644 index 0000000000..cdfd9e3842 --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesContentResponse.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.responses; + +import com.oracle.bmc.resourcemanager.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesContentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique identifier for the request + */ + private String opcRequestId; + + /** + * Unique identifier for the request + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned String instance. + */ + private String value; + + /** + * The returned String instance. + * @return the value + */ + public String getValue() { + return value; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId", "value"}) + private GetWorkRequestLogEntriesContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String value) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.value = value; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique identifier for the request + */ + private String opcRequestId; + + /** + * Unique identifier for the request + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned String instance. + */ + private String value; + + /** + * The returned String instance. + * @param value the value to set + * @return this builder + */ + public Builder value(String value) { + this.value = value; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestLogEntriesContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + value(o.getValue()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestLogEntriesContentResponse build() { + return new GetWorkRequestLogEntriesContentResponse( + __httpStatusCode__, headers, opcRequestId, value); + } + } + + /** + * 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(",value=").append(String.valueOf(value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestLogEntriesContentResponse)) { + return false; + } + + GetWorkRequestLogEntriesContentResponse other = (GetWorkRequestLogEntriesContentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.value, other.value); + } + + @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.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesResponse.java b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesResponse.java new file mode 100644 index 0000000000..321892bb4b --- /dev/null +++ b/bmc-resourcemanager/src/main/java/com/oracle/bmc/resourcemanager/responses/GetWorkRequestLogEntriesResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.resourcemanager.responses; + +import com.oracle.bmc.resourcemanager.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180917") +public class GetWorkRequestLogEntriesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Retrieves the next page of paginated list items. If the {@code opc-next-page} + * header appears in the response, additional pages of results remain. + * To receive the next page, include the header value in the {@code page} param. + * If the {@code opc-next-page} header does not appear in the response, there + * are no more list items to get. For more information about list pagination, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * Retrieves the next page of paginated list items. If the {@code opc-next-page} + * header appears in the response, additional pages of results remain. + * To receive the next page, include the header value in the {@code page} param. + * If the {@code opc-next-page} header does not appear in the response, there + * are no more list items to get. For more information about list pagination, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned LogEntryCollection instance. + */ + private com.oracle.bmc.resourcemanager.model.LogEntryCollection logEntryCollection; + + /** + * The returned LogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.resourcemanager.model.LogEntryCollection getLogEntryCollection() { + return logEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "logEntryCollection" + }) + private GetWorkRequestLogEntriesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.resourcemanager.model.LogEntryCollection logEntryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.logEntryCollection = logEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Retrieves the next page of paginated list items. If the {@code opc-next-page} + * header appears in the response, additional pages of results remain. + * To receive the next page, include the header value in the {@code page} param. + * If the {@code opc-next-page} header does not appear in the response, there + * are no more list items to get. For more information about list pagination, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * Retrieves the next page of paginated list items. If the {@code opc-next-page} + * header appears in the response, additional pages of results remain. + * To receive the next page, include the header value in the {@code page} param. + * If the {@code opc-next-page} header does not appear in the response, there + * are no more list items to get. For more information about list pagination, + * see [List Pagination](https://docs.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 LogEntryCollection instance. + */ + private com.oracle.bmc.resourcemanager.model.LogEntryCollection logEntryCollection; + + /** + * The returned LogEntryCollection instance. + * @param logEntryCollection the value to set + * @return this builder + */ + public Builder logEntryCollection( + com.oracle.bmc.resourcemanager.model.LogEntryCollection logEntryCollection) { + this.logEntryCollection = logEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestLogEntriesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + logEntryCollection(o.getLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestLogEntriesResponse build() { + return new GetWorkRequestLogEntriesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, logEntryCollection); + } + } + + /** + * 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(",logEntryCollection=").append(String.valueOf(logEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestLogEntriesResponse)) { + return false; + } + + GetWorkRequestLogEntriesResponse other = (GetWorkRequestLogEntriesResponse) 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.logEntryCollection, other.logEntryCollection); + } + + @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.logEntryCollection == null + ? 43 + : this.logEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-resourcescheduler/pom.xml b/bmc-resourcescheduler/pom.xml index 3b103d9a8d..9eee88c458 100644 --- a/bmc-resourcescheduler/pom.xml +++ b/bmc-resourcescheduler/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-resourcescheduler @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/CreateScheduleDetails.java b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/CreateScheduleDetails.java index 0562474e08..7924503772 100644 --- a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/CreateScheduleDetails.java +++ b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/CreateScheduleDetails.java @@ -33,6 +33,7 @@ public final class CreateScheduleDetails "resources", "timeStarts", "timeEnds", + "localTimeZone", "freeformTags", "definedTags" }) @@ -47,6 +48,7 @@ public CreateScheduleDetails( java.util.List resources, java.util.Date timeStarts, java.util.Date timeEnds, + String localTimeZone, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -60,6 +62,7 @@ public CreateScheduleDetails( this.resources = resources; this.timeStarts = timeStarts; this.timeEnds = timeEnds; + this.localTimeZone = localTimeZone; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -242,6 +245,26 @@ public Builder timeEnds(java.util.Date timeEnds) { this.__explicitlySet__.add("timeEnds"); return this; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @param localTimeZone the value to set + * @return this builder + **/ + public Builder localTimeZone(String localTimeZone) { + this.localTimeZone = localTimeZone; + this.__explicitlySet__.add("localTimeZone"); + return this; + } /** * These are 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.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -308,6 +331,7 @@ public CreateScheduleDetails build() { this.resources, this.timeStarts, this.timeEnds, + this.localTimeZone, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -348,6 +372,9 @@ public Builder copy(CreateScheduleDetails model) { if (model.wasPropertyExplicitlySet("timeEnds")) { this.timeEnds(model.getTimeEnds()); } + if (model.wasPropertyExplicitlySet("localTimeZone")) { + this.localTimeZone(model.getLocalTimeZone()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -596,6 +623,24 @@ public java.util.Date getTimeEnds() { return timeEnds; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private final String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @return the value + **/ + public String getLocalTimeZone() { + return localTimeZone; + } + /** * These are 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.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -664,6 +709,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", timeStarts=").append(String.valueOf(this.timeStarts)); sb.append(", timeEnds=").append(String.valueOf(this.timeEnds)); + sb.append(", localTimeZone=").append(String.valueOf(this.localTimeZone)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -690,6 +736,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.timeStarts, other.timeStarts) && java.util.Objects.equals(this.timeEnds, other.timeEnds) + && java.util.Objects.equals(this.localTimeZone, other.localTimeZone) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -717,6 +764,9 @@ public int hashCode() { result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.timeStarts == null ? 43 : this.timeStarts.hashCode()); result = (result * PRIME) + (this.timeEnds == null ? 43 : this.timeEnds.hashCode()); + result = + (result * PRIME) + + (this.localTimeZone == null ? 43 : this.localTimeZone.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(); diff --git a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/Schedule.java b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/Schedule.java index f53cd60dbb..31fe866c4b 100644 --- a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/Schedule.java +++ b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/Schedule.java @@ -37,6 +37,7 @@ public final class Schedule extends com.oracle.bmc.http.internal.ExplicitlySetBm "resources", "timeStarts", "timeEnds", + "localTimeZone", "timeCreated", "timeUpdated", "timeLastRun", @@ -59,6 +60,7 @@ public Schedule( java.util.List resources, java.util.Date timeStarts, java.util.Date timeEnds, + String localTimeZone, java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeLastRun, @@ -80,6 +82,7 @@ public Schedule( this.resources = resources; this.timeStarts = timeStarts; this.timeEnds = timeEnds; + this.localTimeZone = localTimeZone; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.timeLastRun = timeLastRun; @@ -285,6 +288,26 @@ public Builder timeEnds(java.util.Date timeEnds) { this.__explicitlySet__.add("timeEnds"); return this; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @param localTimeZone the value to set + * @return this builder + **/ + public Builder localTimeZone(String localTimeZone) { + this.localTimeZone = localTimeZone; + this.__explicitlySet__.add("localTimeZone"); + return this; + } /** * This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -494,6 +517,7 @@ public Schedule build() { this.resources, this.timeStarts, this.timeEnds, + this.localTimeZone, this.timeCreated, this.timeUpdated, this.timeLastRun, @@ -544,6 +568,9 @@ public Builder copy(Schedule model) { if (model.wasPropertyExplicitlySet("timeEnds")) { this.timeEnds(model.getTimeEnds()); } + if (model.wasPropertyExplicitlySet("localTimeZone")) { + this.localTimeZone(model.getLocalTimeZone()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -852,6 +879,24 @@ public java.util.Date getTimeEnds() { return timeEnds; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private final String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @return the value + **/ + public String getLocalTimeZone() { + return localTimeZone; + } + /** * This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -1102,6 +1147,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", timeStarts=").append(String.valueOf(this.timeStarts)); sb.append(", timeEnds=").append(String.valueOf(this.timeEnds)); + sb.append(", localTimeZone=").append(String.valueOf(this.localTimeZone)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", timeLastRun=").append(String.valueOf(this.timeLastRun)); @@ -1136,6 +1182,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.timeStarts, other.timeStarts) && java.util.Objects.equals(this.timeEnds, other.timeEnds) + && java.util.Objects.equals(this.localTimeZone, other.localTimeZone) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.timeLastRun, other.timeLastRun) @@ -1171,6 +1218,9 @@ public int hashCode() { result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.timeStarts == null ? 43 : this.timeStarts.hashCode()); result = (result * PRIME) + (this.timeEnds == null ? 43 : this.timeEnds.hashCode()); + result = + (result * PRIME) + + (this.localTimeZone == null ? 43 : this.localTimeZone.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.timeLastRun == null ? 43 : this.timeLastRun.hashCode()); diff --git a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/ScheduleSummary.java b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/ScheduleSummary.java index 72be868e2e..b5fd2911b0 100644 --- a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/ScheduleSummary.java +++ b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/ScheduleSummary.java @@ -31,6 +31,7 @@ public final class ScheduleSummary extends com.oracle.bmc.http.internal.Explicit "resources", "timeStarts", "timeEnds", + "localTimeZone", "timeCreated", "timeUpdated", "timeLastRun", @@ -53,6 +54,7 @@ public ScheduleSummary( java.util.List resources, java.util.Date timeStarts, java.util.Date timeEnds, + String localTimeZone, java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeLastRun, @@ -74,6 +76,7 @@ public ScheduleSummary( this.resources = resources; this.timeStarts = timeStarts; this.timeEnds = timeEnds; + this.localTimeZone = localTimeZone; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.timeLastRun = timeLastRun; @@ -279,6 +282,26 @@ public Builder timeEnds(java.util.Date timeEnds) { this.__explicitlySet__.add("timeEnds"); return this; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @param localTimeZone the value to set + * @return this builder + **/ + public Builder localTimeZone(String localTimeZone) { + this.localTimeZone = localTimeZone; + this.__explicitlySet__.add("localTimeZone"); + return this; + } /** * This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -488,6 +511,7 @@ public ScheduleSummary build() { this.resources, this.timeStarts, this.timeEnds, + this.localTimeZone, this.timeCreated, this.timeUpdated, this.timeLastRun, @@ -538,6 +562,9 @@ public Builder copy(ScheduleSummary model) { if (model.wasPropertyExplicitlySet("timeEnds")) { this.timeEnds(model.getTimeEnds()); } + if (model.wasPropertyExplicitlySet("localTimeZone")) { + this.localTimeZone(model.getLocalTimeZone()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -846,6 +873,24 @@ public java.util.Date getTimeEnds() { return timeEnds; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private final String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @return the value + **/ + public String getLocalTimeZone() { + return localTimeZone; + } + /** * This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -1043,6 +1088,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", timeStarts=").append(String.valueOf(this.timeStarts)); sb.append(", timeEnds=").append(String.valueOf(this.timeEnds)); + sb.append(", localTimeZone=").append(String.valueOf(this.localTimeZone)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", timeLastRun=").append(String.valueOf(this.timeLastRun)); @@ -1077,6 +1123,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.timeStarts, other.timeStarts) && java.util.Objects.equals(this.timeEnds, other.timeEnds) + && java.util.Objects.equals(this.localTimeZone, other.localTimeZone) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.timeLastRun, other.timeLastRun) @@ -1112,6 +1159,9 @@ public int hashCode() { result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.timeStarts == null ? 43 : this.timeStarts.hashCode()); result = (result * PRIME) + (this.timeEnds == null ? 43 : this.timeEnds.hashCode()); + result = + (result * PRIME) + + (this.localTimeZone == null ? 43 : this.localTimeZone.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.timeLastRun == null ? 43 : this.timeLastRun.hashCode()); diff --git a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/UpdateScheduleDetails.java b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/UpdateScheduleDetails.java index 2b4b78233a..6e625f240e 100644 --- a/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/UpdateScheduleDetails.java +++ b/bmc-resourcescheduler/src/main/java/com/oracle/bmc/resourcescheduler/model/UpdateScheduleDetails.java @@ -32,6 +32,7 @@ public final class UpdateScheduleDetails "resources", "timeStarts", "timeEnds", + "localTimeZone", "freeformTags", "definedTags" }) @@ -45,6 +46,7 @@ public UpdateScheduleDetails( java.util.List resources, java.util.Date timeStarts, java.util.Date timeEnds, + String localTimeZone, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -57,6 +59,7 @@ public UpdateScheduleDetails( this.resources = resources; this.timeStarts = timeStarts; this.timeEnds = timeEnds; + this.localTimeZone = localTimeZone; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -223,6 +226,26 @@ public Builder timeEnds(java.util.Date timeEnds) { this.__explicitlySet__.add("timeEnds"); return this; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @param localTimeZone the value to set + * @return this builder + **/ + public Builder localTimeZone(String localTimeZone) { + this.localTimeZone = localTimeZone; + this.__explicitlySet__.add("localTimeZone"); + return this; + } /** * These are 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.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -288,6 +311,7 @@ public UpdateScheduleDetails build() { this.resources, this.timeStarts, this.timeEnds, + this.localTimeZone, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -325,6 +349,9 @@ public Builder copy(UpdateScheduleDetails model) { if (model.wasPropertyExplicitlySet("timeEnds")) { this.timeEnds(model.getTimeEnds()); } + if (model.wasPropertyExplicitlySet("localTimeZone")) { + this.localTimeZone(model.getLocalTimeZone()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -559,6 +586,24 @@ public java.util.Date getTimeEnds() { return timeEnds; } + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localTimeZone") + private final String localTimeZone; + + /** + * IANA timezone identifier (e.g., 'America/New_York', 'UTC', 'Europe/London'). + * This determines the timezone context for evaluating the recurrence expression. + * + * @return the value + **/ + public String getLocalTimeZone() { + return localTimeZone; + } + /** * These are 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.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -626,6 +671,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", timeStarts=").append(String.valueOf(this.timeStarts)); sb.append(", timeEnds=").append(String.valueOf(this.timeEnds)); + sb.append(", localTimeZone=").append(String.valueOf(this.localTimeZone)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -651,6 +697,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.timeStarts, other.timeStarts) && java.util.Objects.equals(this.timeEnds, other.timeEnds) + && java.util.Objects.equals(this.localTimeZone, other.localTimeZone) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -675,6 +722,9 @@ public int hashCode() { result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.timeStarts == null ? 43 : this.timeStarts.hashCode()); result = (result * PRIME) + (this.timeEnds == null ? 43 : this.timeEnds.hashCode()); + result = + (result * PRIME) + + (this.localTimeZone == null ? 43 : this.localTimeZone.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(); diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index d629166e74..b2e83d197f 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-resourcesearch @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-rover/pom.xml b/bmc-rover/pom.xml index fff7890460..898068be6e 100644 --- a/bmc-rover/pom.xml +++ b/bmc-rover/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-rover @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-sch/pom.xml b/bmc-sch/pom.xml index 26a70181dd..c3f90ca7f7 100644 --- a/bmc-sch/pom.xml +++ b/bmc-sch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-sch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-secrets/pom.xml b/bmc-secrets/pom.xml index 65a0a4394a..ba2b8251ce 100644 --- a/bmc-secrets/pom.xml +++ b/bmc-secrets/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-secrets @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-securityattribute/pom.xml b/bmc-securityattribute/pom.xml index d903003a5e..3f93bf9c52 100644 --- a/bmc-securityattribute/pom.xml +++ b/bmc-securityattribute/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-securityattribute @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-self/pom.xml b/bmc-self/pom.xml index dc92650f76..acdc4fc6d0 100644 --- a/bmc-self/pom.xml +++ b/bmc-self/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-self @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegeration.java b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegeration.java index 599b1bd322..f16eb6f3b0 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegeration.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegeration.java @@ -72,6 +72,19 @@ public interface PartnerIntegeration extends AutoCloseable { */ ActivateSubscriptionResponse activateSubscription(ActivateSubscriptionRequest request); + /** + * Lists marketplace publisher partner info for 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 ListPartners API. + */ + ListPartnersResponse listPartners(ListPartnersRequest request); + /** * Gets information about a Subscription. * @param request The request object containing the details to send @@ -97,6 +110,64 @@ public interface PartnerIntegeration extends AutoCloseable { */ ResolveSubscriptionResponse resolveSubscription(ResolveSubscriptionRequest request); + /** + * Asynchronously submits a UTF-8 CSV usage file for marketplace offers. The file + * must not exceed 50 MB or 10,000 rows and must include required usage columns. + * + * + * Note: This operation consumes a stream. + * + * If the stream supports {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, when a retry is + * necessary, the stream is reset so it starts at the beginning (or whatever the stream's position was at the time this + * operation is called}. + * + * Note this means that if the caller has used {@link java.io.InputStream#mark(int)} before, then the mark + * will not be the same anymore after this operation, and a subsequent call to {@link java.io.InputStream#reset()} by + * the caller will reset the stream not to the caller's mark, but to the position the stream was in when this operation + * was called. + * + * If the stream is a {@link java.io.FileInputStream}, and the stream's {@link java.nio.channels.FileChannel} position + * can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide + * support for {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}. Then the same procedure as + * above is followed. If the stream's {@link java.nio.channels.FileChannel} position cannot be changed (like for a + * named pipe), then the stream's contents will be buffered in memory, as described below. + * + * If the stream does not support {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, then + * the stream is wrapped in a {@link java.io.BufferedInputStream}, which means the entire contents may + * be buffered in memory. Then the same procedure as above is followed. + * + * The contents of the stream, except when the stream is a {@link java.io.FileInputStream} whose + * {@link java.nio.channels.FileChannel} position can be changed, should be less than 2 GiB in size if retries are used. + * This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream + * is larger, do not use built-in retries and manage retries yourself. + * + * @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 SubmitSubscriptionUsageBatch API. + */ + SubmitSubscriptionUsageBatchResponse submitSubscriptionUsageBatch( + SubmitSubscriptionUsageBatchRequest request); + + /** + * Synchronously submits usage records for marketplace offers. Each record must include + * `id`, `marketplaceOfferId`, `amount`, `currencyCode`, `timeUsageStarted`, + * `timeUsageEnded`, and `usageDimensionName`. + * + * @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 SubmitSubscriptionUsageRecords API. + */ + SubmitSubscriptionUsageRecordsResponse submitSubscriptionUsageRecords( + SubmitSubscriptionUsageRecordsRequest request); + /** * 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 diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsync.java b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsync.java index fb0e1745dd..c104192928 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsync.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsync.java @@ -75,6 +75,22 @@ java.util.concurrent.Future activateSubscription( ActivateSubscriptionRequest, ActivateSubscriptionResponse> handler); + /** + * Lists marketplace publisher partner info for 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 listPartners( + ListPartnersRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets information about a Subscription. * @@ -107,4 +123,44 @@ java.util.concurrent.Future resolveSubscription( com.oracle.bmc.responses.AsyncHandler< ResolveSubscriptionRequest, ResolveSubscriptionResponse> handler); + + /** + * Asynchronously submits a UTF-8 CSV usage file for marketplace offers. The file + * must not exceed 50 MB or 10,000 rows and must include required usage columns. + * + * + * @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 submitSubscriptionUsageBatch( + SubmitSubscriptionUsageBatchRequest request, + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageBatchRequest, + SubmitSubscriptionUsageBatchResponse> + handler); + + /** + * Synchronously submits usage records for marketplace offers. Each record must include + * `id`, `marketplaceOfferId`, `amount`, `currencyCode`, `timeUsageStarted`, + * `timeUsageEnded`, and `usageDimensionName`. + * + * + * @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 + submitSubscriptionUsageRecords( + SubmitSubscriptionUsageRecordsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageRecordsRequest, + SubmitSubscriptionUsageRecordsResponse> + handler); } diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsyncClient.java b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsyncClient.java index 179c39b085..122d9979e6 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsyncClient.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationAsyncClient.java @@ -523,6 +523,50 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listPartners( + ListPartnersRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listPartners"); + final ListPartnersRequest interceptedRequest = + ListPartnersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPartnersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "ListPartners", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/Partner/ListPartners"); + final java.util.function.Function + transformer = + ListPartnersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPartnersRequest, ListPartnersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPartnersRequest, ListPartnersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listingSubscriptions( ListingSubscriptionsRequest request, @@ -622,4 +666,131 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future + submitSubscriptionUsageBatch( + SubmitSubscriptionUsageBatchRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageBatchRequest, + SubmitSubscriptionUsageBatchResponse> + handler) { + LOG.trace("Called async submitSubscriptionUsageBatch"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, SubmitSubscriptionUsageBatchRequest.builder()); + } + final SubmitSubscriptionUsageBatchRequest interceptedRequest = + SubmitSubscriptionUsageBatchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SubmitSubscriptionUsageBatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "SubmitSubscriptionUsageBatch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/CreateSubscriptionUsageRecordDetails/SubmitSubscriptionUsageBatch"); + final java.util.function.Function< + javax.ws.rs.core.Response, SubmitSubscriptionUsageBatchResponse> + transformer = + SubmitSubscriptionUsageBatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageBatchRequest, SubmitSubscriptionUsageBatchResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageBatchRequest, + SubmitSubscriptionUsageBatchResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSubmitSubscriptionUsageBatchDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SubmitSubscriptionUsageBatchRequest, SubmitSubscriptionUsageBatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getSubmitSubscriptionUsageBatchDetails(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + submitSubscriptionUsageRecords( + SubmitSubscriptionUsageRecordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageRecordsRequest, + SubmitSubscriptionUsageRecordsResponse> + handler) { + LOG.trace("Called async submitSubscriptionUsageRecords"); + final SubmitSubscriptionUsageRecordsRequest interceptedRequest = + SubmitSubscriptionUsageRecordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SubmitSubscriptionUsageRecordsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "SubmitSubscriptionUsageRecords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/CreateSubscriptionUsageRecordDetails/SubmitSubscriptionUsageRecords"); + final java.util.function.Function< + javax.ws.rs.core.Response, SubmitSubscriptionUsageRecordsResponse> + transformer = + SubmitSubscriptionUsageRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageRecordsRequest, + SubmitSubscriptionUsageRecordsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SubmitSubscriptionUsageRecordsRequest, + SubmitSubscriptionUsageRecordsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSubmitSubscriptionUsageRecordsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SubmitSubscriptionUsageRecordsRequest, SubmitSubscriptionUsageRecordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationClient.java b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationClient.java index 77b12bf1a6..462eb5a265 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationClient.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationClient.java @@ -527,6 +527,41 @@ public ActivateSubscriptionResponse activateSubscription(ActivateSubscriptionReq }); } + @Override + public ListPartnersResponse listPartners(ListPartnersRequest request) { + LOG.trace("Called listPartners"); + final ListPartnersRequest interceptedRequest = + ListPartnersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPartnersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "ListPartners", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/Partner/ListPartners"); + java.util.function.Function transformer = + ListPartnersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListingSubscriptionsResponse listingSubscriptions(ListingSubscriptionsRequest request) { LOG.trace("Called listingSubscriptions"); @@ -606,8 +641,156 @@ public ResolveSubscriptionResponse resolveSubscription(ResolveSubscriptionReques }); } + @Override + public SubmitSubscriptionUsageBatchResponse submitSubscriptionUsageBatch( + SubmitSubscriptionUsageBatchRequest request) { + LOG.trace("Called submitSubscriptionUsageBatch"); + try { + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + request.getRetryConfiguration(), retryConfiguration, true); + if (request.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, SubmitSubscriptionUsageBatchRequest.builder()); + } + final SubmitSubscriptionUsageBatchRequest interceptedRequest = + SubmitSubscriptionUsageBatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SubmitSubscriptionUsageBatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "SubmitSubscriptionUsageBatch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/CreateSubscriptionUsageRecordDetails/SubmitSubscriptionUsageBatch"); + java.util.function.Function< + javax.ws.rs.core.Response, SubmitSubscriptionUsageBatchResponse> + transformer = + SubmitSubscriptionUsageBatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + try { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getSubmitSubscriptionUsageBatchDetails(), + retriedRequest); + return transformer.apply(response); + } catch (RuntimeException e) { + if (interceptedRequest.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || (e instanceof com.oracle.bmc.model.BmcException + && tokenRefreshRetrier + .getRetryCondition() + .shouldBeRetried( + (com.oracle.bmc.model + .BmcException) + e))) { + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest + .getSubmitSubscriptionUsageBatchDetails(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getSubmitSubscriptionUsageBatchDetails()); + } + } + + @Override + public SubmitSubscriptionUsageRecordsResponse submitSubscriptionUsageRecords( + SubmitSubscriptionUsageRecordsRequest request) { + LOG.trace("Called submitSubscriptionUsageRecords"); + final SubmitSubscriptionUsageRecordsRequest interceptedRequest = + SubmitSubscriptionUsageRecordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SubmitSubscriptionUsageRecordsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "PartnerIntegeration", + "SubmitSubscriptionUsageRecords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/CreateSubscriptionUsageRecordDetails/SubmitSubscriptionUsageRecords"); + java.util.function.Function< + javax.ws.rs.core.Response, SubmitSubscriptionUsageRecordsResponse> + transformer = + SubmitSubscriptionUsageRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getSubmitSubscriptionUsageRecordsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public PartnerIntegerationPaginators getPaginators() { return paginators; } + + private static boolean shouldRetryBecauseOfWaiterConfiguration( + com.oracle.bmc.retrier.BmcGenericRetrier retrier) { + boolean hasTerminationStrategy = false; + boolean isMaxAttemptsTerminationStrategy = false; + if (retrier.getWaiter() != null && retrier.getWaiter().getWaiterConfiguration() != null) { + hasTerminationStrategy = + retrier.getWaiter().getWaiterConfiguration().getTerminationStrategy() != null; + if (hasTerminationStrategy) { + isMaxAttemptsTerminationStrategy = + retrier.getWaiter().getWaiterConfiguration().getTerminationStrategy() + instanceof com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy; + } + } + final boolean shouldRetry = + hasTerminationStrategy + && (!isMaxAttemptsTerminationStrategy + || isMaxAttemptsTerminationStrategy + && ((com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy) + retrier.getWaiter() + .getWaiterConfiguration() + .getTerminationStrategy()) + .getMaxAttempts() + > 1); + return shouldRetry; + } } diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationPaginators.java b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationPaginators.java index a51a2c8d7c..47319a043a 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationPaginators.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/PartnerIntegerationPaginators.java @@ -33,6 +33,116 @@ public PartnerIntegerationPaginators(PartnerIntegeration client) { this.client = client; } + /** + * Creates a new iterable which will iterate over the responses received from the listPartners 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 listPartnersResponseIterator( + final ListPartnersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPartnersRequest.Builder, ListPartnersRequest, ListPartnersResponse>( + new java.util.function.Supplier() { + @Override + public ListPartnersRequest.Builder get() { + return ListPartnersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPartnersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPartnersRequest.Builder>, + ListPartnersRequest>() { + @Override + public ListPartnersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPartnersRequest.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 ListPartnersResponse apply(ListPartnersRequest request) { + return client.listPartners(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.self.model.PartnerSummary} objects + * contained in responses from the listPartners 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.self.model.PartnerSummary} objects + * contained in responses received from the service. + */ + public Iterable listPartnersRecordIterator( + final ListPartnersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPartnersRequest.Builder, ListPartnersRequest, ListPartnersResponse, + com.oracle.bmc.self.model.PartnerSummary>( + new java.util.function.Supplier() { + @Override + public ListPartnersRequest.Builder get() { + return ListPartnersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPartnersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPartnersRequest.Builder>, + ListPartnersRequest>() { + @Override + public ListPartnersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPartnersRequest.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 ListPartnersResponse apply(ListPartnersRequest request) { + return client.listPartners(request); + } + }, + new java.util.function.Function< + ListPartnersResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListPartnersResponse response) { + return response.getPartnerCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listingSubscriptions operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/Subscription.java b/bmc-self/src/main/java/com/oracle/bmc/self/Subscription.java index 9639456bf5..0a6f42a494 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/Subscription.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/Subscription.java @@ -59,6 +59,21 @@ public interface Subscription extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Requests cancellation of a Subscription. The subscription transitions to PendingCancellation + * and remains active until the end of the current billing cycle, at which point it transitions + * to Canceled. The subscription must be in the Active state to be canceled. + * + * @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 CancelSubscription API. + */ + CancelSubscriptionResponse cancelSubscription(CancelSubscriptionRequest request); + /** * Cancels a work request. * @param request The request object containing the details to send diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsync.java b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsync.java index 74daa4e784..37661cd5d7 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsync.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsync.java @@ -58,6 +58,25 @@ public interface SubscriptionAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Requests cancellation of a Subscription. The subscription transitions to PendingCancellation + * and remains active until the end of the current billing cycle, at which point it transitions + * to Canceled. The subscription must be in the Active state to be canceled. + * + * + * @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 cancelSubscription( + CancelSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelSubscriptionRequest, CancelSubscriptionResponse> + handler); + /** * Cancels a work request. * diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsyncClient.java b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsyncClient.java index 285f5e26e6..bc96f5c451 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsyncClient.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionAsyncClient.java @@ -469,6 +469,58 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future cancelSubscription( + CancelSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelSubscriptionRequest, CancelSubscriptionResponse> + handler) { + LOG.trace("Called async cancelSubscription"); + final CancelSubscriptionRequest interceptedRequest = + CancelSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Subscription", + "CancelSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/Subscription/CancelSubscription"); + final java.util.function.Function + transformer = + CancelSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CancelSubscriptionRequest, CancelSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCancelSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CancelSubscriptionRequest, CancelSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future cancelWorkRequest( CancelWorkRequestRequest request, diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionClient.java b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionClient.java index 394eb86f34..123780d14a 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionClient.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/SubscriptionClient.java @@ -558,6 +558,48 @@ public void close() { client.close(); } + @Override + public CancelSubscriptionResponse cancelSubscription(CancelSubscriptionRequest request) { + LOG.trace("Called cancelSubscription"); + final CancelSubscriptionRequest interceptedRequest = + CancelSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Subscription", + "CancelSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/self/20260129/Subscription/CancelSubscription"); + java.util.function.Function + transformer = + CancelSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCancelSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request) { LOG.trace("Called cancelWorkRequest"); diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ActivateSubscriptionConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ActivateSubscriptionConverter.java index 83980ea42c..c50727516e 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ActivateSubscriptionConverter.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ActivateSubscriptionConverter.java @@ -37,7 +37,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() .path("/20260129") - .path("partner") + .path("partners") .path("subscriptions") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/CancelSubscriptionConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/CancelSubscriptionConverter.java new file mode 100644 index 0000000000..4eb1ad0c48 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/CancelSubscriptionConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.self.model.*; +import com.oracle.bmc.self.requests.*; +import com.oracle.bmc.self.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class CancelSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CancelSubscriptionConverter.class); + + public static com.oracle.bmc.self.requests.CancelSubscriptionRequest interceptRequest( + com.oracle.bmc.self.requests.CancelSubscriptionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.self.requests.CancelSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSubscriptionId(), "subscriptionId must not be blank"); + Validate.notNull( + request.getCancelSubscriptionDetails(), "cancelSubscriptionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260129") + .path("subscriptions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSubscriptionId())) + .path("actions") + .path("cancel"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.CancelSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.CancelSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.CancelSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.CancelSubscriptionResponse>() { + @Override + public com.oracle.bmc.self.responses.CancelSubscriptionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.self.responses.CancelSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.self.model.Subscription>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.self.model.Subscription.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.self.model.Subscription.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.self.model.Subscription> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.self.responses.CancelSubscriptionResponse.Builder + builder = + com.oracle.bmc.self.responses + .CancelSubscriptionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.subscription(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.self.responses.CancelSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListPartnersConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListPartnersConverter.java new file mode 100644 index 0000000000..58d0b3ac1f --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListPartnersConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.self.model.*; +import com.oracle.bmc.self.requests.*; +import com.oracle.bmc.self.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class ListPartnersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPartnersConverter.class); + + public static com.oracle.bmc.self.requests.ListPartnersRequest interceptRequest( + com.oracle.bmc.self.requests.ListPartnersRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.self.requests.ListPartnersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20260129").path("partners"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.self.responses.ListPartnersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.self.responses.ListPartnersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.ListPartnersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.ListPartnersResponse>() { + @Override + public com.oracle.bmc.self.responses.ListPartnersResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.self.responses.ListPartnersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.self.model + .PartnerCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.self.model.PartnerCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.self.model.PartnerCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.self.model.PartnerCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.self.responses.ListPartnersResponse.Builder builder = + com.oracle.bmc.self.responses.ListPartnersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.partnerCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.self.responses.ListPartnersResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListingSubscriptionsConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListingSubscriptionsConverter.java index 0655950988..ac2628e277 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListingSubscriptionsConverter.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ListingSubscriptionsConverter.java @@ -32,7 +32,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( Validate.notNull(request.getListingId(), "listingId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = - client.getBaseTarget().path("/20260129").path("partner").path("subscriptions"); + client.getBaseTarget().path("/20260129").path("partners").path("subscriptions"); target = target.queryParam( diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ResolveSubscriptionConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ResolveSubscriptionConverter.java index 2568d7fd11..e0a7762261 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ResolveSubscriptionConverter.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/ResolveSubscriptionConverter.java @@ -35,7 +35,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() .path("/20260129") - .path("partner") + .path("partners") .path("subscriptions") .path("actions") .path("resolve"); diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageBatchConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageBatchConverter.java new file mode 100644 index 0000000000..4256d31ed0 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageBatchConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.self.model.*; +import com.oracle.bmc.self.requests.*; +import com.oracle.bmc.self.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageBatchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SubmitSubscriptionUsageBatchConverter.class); + + public static com.oracle.bmc.self.requests.SubmitSubscriptionUsageBatchRequest interceptRequest( + com.oracle.bmc.self.requests.SubmitSubscriptionUsageBatchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.self.requests.SubmitSubscriptionUsageBatchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull( + request.getSubmitSubscriptionUsageBatchDetails(), + "submitSubscriptionUsageBatchDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260129") + .path("partners") + .path("actions") + .path("batchUsageRecords"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + ib.header("compartment-id", request.getCompartmentId()); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses + .SubmitSubscriptionUsageBatchResponse>() { + @Override + public com.oracle.bmc.self.responses + .SubmitSubscriptionUsageBatchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse + .Builder + builder = + com.oracle.bmc.self.responses + .SubmitSubscriptionUsageBatchResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.self.responses.SubmitSubscriptionUsageBatchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageRecordsConverter.java b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageRecordsConverter.java new file mode 100644 index 0000000000..e387695a3f --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/internal/http/SubmitSubscriptionUsageRecordsConverter.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.self.model.*; +import com.oracle.bmc.self.requests.*; +import com.oracle.bmc.self.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageRecordsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SubmitSubscriptionUsageRecordsConverter.class); + + public static com.oracle.bmc.self.requests.SubmitSubscriptionUsageRecordsRequest + interceptRequest( + com.oracle.bmc.self.requests.SubmitSubscriptionUsageRecordsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.self.requests.SubmitSubscriptionUsageRecordsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull( + request.getSubmitSubscriptionUsageRecordsDetails(), + "submitSubscriptionUsageRecordsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20260129") + .path("partners") + .path("actions") + .path("submitUsageRecords"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + ib.header("compartment-id", request.getCompartmentId()); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.self.responses + .SubmitSubscriptionUsageRecordsResponse>() { + @Override + public com.oracle.bmc.self.responses + .SubmitSubscriptionUsageRecordsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse + .Builder + builder = + com.oracle.bmc.self.responses + .SubmitSubscriptionUsageRecordsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.self.responses.SubmitSubscriptionUsageRecordsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingDetails.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingDetails.java index ab7fefec4d..ec1dde68af 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingDetails.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.self.model; /** - * Sku details for billing subscription. + * Billing detail entry associated with a subscription. *
* 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 @@ -20,6 +20,8 @@ public final class BillingDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "pricingPlanKey", + "billingModel", "sku", "metricType", "rateAllocation", @@ -27,12 +29,16 @@ public final class BillingDetails extends com.oracle.bmc.http.internal.Explicitl "meters" }) public BillingDetails( + String pricingPlanKey, + BillingModel billingModel, String sku, MetricType metricType, Float rateAllocation, Boolean hasGovSku, java.util.List meters) { super(); + this.pricingPlanKey = pricingPlanKey; + this.billingModel = billingModel; this.sku = sku; this.metricType = metricType; this.rateAllocation = rateAllocation; @@ -42,6 +48,38 @@ public BillingDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique key used to map this SKU to the pricing plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pricingPlanKey") + private String pricingPlanKey; + + /** + * Unique key used to map this SKU to the pricing plan. + * @param pricingPlanKey the value to set + * @return this builder + **/ + public Builder pricingPlanKey(String pricingPlanKey) { + this.pricingPlanKey = pricingPlanKey; + this.__explicitlySet__.add("pricingPlanKey"); + return this; + } + /** + * The billing model this billing detail applies to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingModel") + private BillingModel billingModel; + + /** + * The billing model this billing detail applies to. + * @param billingModel the value to set + * @return this builder + **/ + public Builder billingModel(BillingModel billingModel) { + this.billingModel = billingModel; + this.__explicitlySet__.add("billingModel"); + return this; + } /** * Sku for service. **/ @@ -129,6 +167,8 @@ public Builder meters(java.util.List meters) { public BillingDetails build() { BillingDetails model = new BillingDetails( + this.pricingPlanKey, + this.billingModel, this.sku, this.metricType, this.rateAllocation, @@ -142,6 +182,12 @@ public BillingDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BillingDetails model) { + if (model.wasPropertyExplicitlySet("pricingPlanKey")) { + this.pricingPlanKey(model.getPricingPlanKey()); + } + if (model.wasPropertyExplicitlySet("billingModel")) { + this.billingModel(model.getBillingModel()); + } if (model.wasPropertyExplicitlySet("sku")) { this.sku(model.getSku()); } @@ -172,6 +218,82 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique key used to map this SKU to the pricing plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pricingPlanKey") + private final String pricingPlanKey; + + /** + * Unique key used to map this SKU to the pricing plan. + * @return the value + **/ + public String getPricingPlanKey() { + return pricingPlanKey; + } + + /** + * The billing model this billing detail applies to. + **/ + public enum BillingModel { + FlatRate("FLAT_RATE"), + UsageBased("USAGE_BASED"), + + /** + * 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(BillingModel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BillingModel v : BillingModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BillingModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BillingModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BillingModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The billing model this billing detail applies to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingModel") + private final BillingModel billingModel; + + /** + * The billing model this billing detail applies to. + * @return the value + **/ + public BillingModel getBillingModel() { + return billingModel; + } + /** * Sku for service. **/ @@ -256,7 +378,9 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BillingDetails("); sb.append("super=").append(super.toString()); - sb.append("sku=").append(String.valueOf(this.sku)); + sb.append("pricingPlanKey=").append(String.valueOf(this.pricingPlanKey)); + sb.append(", billingModel=").append(String.valueOf(this.billingModel)); + sb.append(", sku=").append(String.valueOf(this.sku)); sb.append(", metricType=").append(String.valueOf(this.metricType)); sb.append(", rateAllocation=").append(String.valueOf(this.rateAllocation)); sb.append(", hasGovSku=").append(String.valueOf(this.hasGovSku)); @@ -275,7 +399,9 @@ public boolean equals(Object o) { } BillingDetails other = (BillingDetails) o; - return java.util.Objects.equals(this.sku, other.sku) + return java.util.Objects.equals(this.pricingPlanKey, other.pricingPlanKey) + && java.util.Objects.equals(this.billingModel, other.billingModel) + && java.util.Objects.equals(this.sku, other.sku) && java.util.Objects.equals(this.metricType, other.metricType) && java.util.Objects.equals(this.rateAllocation, other.rateAllocation) && java.util.Objects.equals(this.hasGovSku, other.hasGovSku) @@ -287,6 +413,10 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = + (result * PRIME) + + (this.pricingPlanKey == null ? 43 : this.pricingPlanKey.hashCode()); + result = (result * PRIME) + (this.billingModel == null ? 43 : this.billingModel.hashCode()); result = (result * PRIME) + (this.sku == null ? 43 : this.sku.hashCode()); result = (result * PRIME) + (this.metricType == null ? 43 : this.metricType.hashCode()); result = diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingFrequency.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingFrequency.java new file mode 100644 index 0000000000..830a5ca3fe --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/BillingFrequency.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * Supported billing frequencies for subscription plans and usage dimensions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public enum BillingFrequency { + Monthly("MONTHLY"), + Quarterly("QUARTERLY"), + SemiAnnual("SEMI_ANNUAL"), + Annual("ANNUAL"), + Biennial("BIENNIAL"), + Triennial("TRIENNIAL"), + Yearly("YEARLY"), + + /** + * 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(BillingFrequency.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BillingFrequency v : BillingFrequency.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BillingFrequency(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BillingFrequency create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BillingFrequency', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/CancelSubscriptionDetails.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/CancelSubscriptionDetails.java new file mode 100644 index 0000000000..97c5ca4de7 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/CancelSubscriptionDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * The data to cancel a Subscription. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CancelSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CancelSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"reason"}) + public CancelSubscriptionDetails(String reason) { + super(); + this.reason = reason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Optional reason provided by the customer for the cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * Optional reason provided by the customer for the cancellation. + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CancelSubscriptionDetails build() { + CancelSubscriptionDetails model = new CancelSubscriptionDetails(this.reason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CancelSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Optional reason provided by the customer for the cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * Optional reason provided by the customer for the cancellation. + * @return the value + **/ + public String getReason() { + return reason; + } + + @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("CancelSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("reason=").append(String.valueOf(this.reason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelSubscriptionDetails)) { + return false; + } + + CancelSubscriptionDetails other = (CancelSubscriptionDetails) o; + return java.util.Objects.equals(this.reason, other.reason) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/CreateSubscriptionUsageRecordDetails.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/CreateSubscriptionUsageRecordDetails.java new file mode 100644 index 0000000000..cb41210b41 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/CreateSubscriptionUsageRecordDetails.java @@ -0,0 +1,888 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * A single usage record to submit for a marketplace offer. The usage window must have + * {@code timeUsageStarted} before {@code timeUsageEnded}. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSubscriptionUsageRecordDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSubscriptionUsageRecordDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "marketplaceOfferId", + "billingType", + "usageDimensionName", + "consumedQuantity", + "amount", + "currencyCode", + "billingPeriod", + "customerTenancyId", + "billingIdentifier", + "unitOfMeasure", + "unitPrice", + "productSku", + "contractDuration", + "additionalMetadata", + "usageRecordId", + "timeUsageStarted", + "timeUsageEnded" + }) + public CreateSubscriptionUsageRecordDetails( + String id, + String marketplaceOfferId, + BillingType billingType, + String usageDimensionName, + Double consumedQuantity, + Double amount, + String currencyCode, + String billingPeriod, + String customerTenancyId, + String billingIdentifier, + String unitOfMeasure, + Double unitPrice, + String productSku, + BillingFrequency contractDuration, + java.util.List additionalMetadata, + String usageRecordId, + java.util.Date timeUsageStarted, + java.util.Date timeUsageEnded) { + super(); + this.id = id; + this.marketplaceOfferId = marketplaceOfferId; + this.billingType = billingType; + this.usageDimensionName = usageDimensionName; + this.consumedQuantity = consumedQuantity; + this.amount = amount; + this.currencyCode = currencyCode; + this.billingPeriod = billingPeriod; + this.customerTenancyId = customerTenancyId; + this.billingIdentifier = billingIdentifier; + this.unitOfMeasure = unitOfMeasure; + this.unitPrice = unitPrice; + this.productSku = productSku; + this.contractDuration = contractDuration; + this.additionalMetadata = additionalMetadata; + this.usageRecordId = usageRecordId; + this.timeUsageStarted = timeUsageStarted; + this.timeUsageEnded = timeUsageEnded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Partner-provided unique identifier for this usage record. This identifier must be unique per partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Partner-provided unique identifier for this usage record. This identifier must be unique per partner. + * @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.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the marketplace offer being billed. A submit request can contain records for multiple marketplace offers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("marketplaceOfferId") + private String marketplaceOfferId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the marketplace offer being billed. A submit request can contain records for multiple marketplace offers. + * @param marketplaceOfferId the value to set + * @return this builder + **/ + public Builder marketplaceOfferId(String marketplaceOfferId) { + this.marketplaceOfferId = marketplaceOfferId; + this.__explicitlySet__.add("marketplaceOfferId"); + return this; + } + /** + * The billing type this usage record applies to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingType") + private BillingType billingType; + + /** + * The billing type this usage record applies to. + * @param billingType the value to set + * @return this builder + **/ + public Builder billingType(BillingType billingType) { + this.billingType = billingType; + this.__explicitlySet__.add("billingType"); + return this; + } + /** + * The pricing dimension against which usage is being reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageDimensionName") + private String usageDimensionName; + + /** + * The pricing dimension against which usage is being reported. + * @param usageDimensionName the value to set + * @return this builder + **/ + public Builder usageDimensionName(String usageDimensionName) { + this.usageDimensionName = usageDimensionName; + this.__explicitlySet__.add("usageDimensionName"); + return this; + } + /** + * An optional non-negative usage quantity being reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumedQuantity") + private Double consumedQuantity; + + /** + * An optional non-negative usage quantity being reported. + * @param consumedQuantity the value to set + * @return this builder + **/ + public Builder consumedQuantity(Double consumedQuantity) { + this.consumedQuantity = consumedQuantity; + this.__explicitlySet__.add("consumedQuantity"); + return this; + } + /** + * The non-negative usage cost computed by the partner for the submitted usage quantity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("amount") + private Double amount; + + /** + * The non-negative usage cost computed by the partner for the submitted usage quantity. + * @param amount the value to set + * @return this builder + **/ + public Builder amount(Double amount) { + this.amount = amount; + this.__explicitlySet__.add("amount"); + return this; + } + /** + * The ISO-4217 currency submitted for the computed usage cost. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currencyCode") + private String currencyCode; + + /** + * The ISO-4217 currency submitted for the computed usage cost. + * @param currencyCode the value to set + * @return this builder + **/ + public Builder currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + this.__explicitlySet__.add("currencyCode"); + return this; + } + /** + * The billing period associated with this usage record in {@code YYYY-MM} format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingPeriod") + private String billingPeriod; + + /** + * The billing period associated with this usage record in {@code YYYY-MM} format. + * @param billingPeriod the value to set + * @return this builder + **/ + public Builder billingPeriod(String billingPeriod) { + this.billingPeriod = billingPeriod; + this.__explicitlySet__.add("billingPeriod"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer tenancy associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerTenancyId") + private String customerTenancyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer tenancy associated with this usage record. + * @param customerTenancyId the value to set + * @return this builder + **/ + public Builder customerTenancyId(String customerTenancyId) { + this.customerTenancyId = customerTenancyId; + this.__explicitlySet__.add("customerTenancyId"); + return this; + } + /** + * The partner billing identifier associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingIdentifier") + private String billingIdentifier; + + /** + * The partner billing identifier associated with this usage record. + * @param billingIdentifier the value to set + * @return this builder + **/ + public Builder billingIdentifier(String billingIdentifier) { + this.billingIdentifier = billingIdentifier; + this.__explicitlySet__.add("billingIdentifier"); + return this; + } + /** + * The unit of measure associated with the reported usage quantity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unitOfMeasure") + private String unitOfMeasure; + + /** + * The unit of measure associated with the reported usage quantity. + * @param unitOfMeasure the value to set + * @return this builder + **/ + public Builder unitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + this.__explicitlySet__.add("unitOfMeasure"); + return this; + } + /** + * The unit price associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unitPrice") + private Double unitPrice; + + /** + * The unit price associated with this usage record. + * @param unitPrice the value to set + * @return this builder + **/ + public Builder unitPrice(Double unitPrice) { + this.unitPrice = unitPrice; + this.__explicitlySet__.add("unitPrice"); + return this; + } + /** + * The product SKU associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productSku") + private String productSku; + + /** + * The product SKU associated with this usage record. + * @param productSku the value to set + * @return this builder + **/ + public Builder productSku(String productSku) { + this.productSku = productSku; + this.__explicitlySet__.add("productSku"); + return this; + } + /** + * The contract duration associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contractDuration") + private BillingFrequency contractDuration; + + /** + * The contract duration associated with this usage record. + * @param contractDuration the value to set + * @return this builder + **/ + public Builder contractDuration(BillingFrequency contractDuration) { + this.contractDuration = contractDuration; + this.__explicitlySet__.add("contractDuration"); + return this; + } + /** + * Additional key/value metadata associated with this usage record for extensibility. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalMetadata") + private java.util.List additionalMetadata; + + /** + * Additional key/value metadata associated with this usage record for extensibility. + * @param additionalMetadata the value to set + * @return this builder + **/ + public Builder additionalMetadata(java.util.List additionalMetadata) { + this.additionalMetadata = additionalMetadata; + this.__explicitlySet__.add("additionalMetadata"); + return this; + } + /** + * Partner-provided usage record identifier for traceability. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageRecordId") + private String usageRecordId; + + /** + * Partner-provided usage record identifier for traceability. + * @param usageRecordId the value to set + * @return this builder + **/ + public Builder usageRecordId(String usageRecordId) { + this.usageRecordId = usageRecordId; + this.__explicitlySet__.add("usageRecordId"); + return this; + } + /** + * The inclusive start timestamp for the usage window. This value must be before {@code timeUsageEnded}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUsageStarted") + private java.util.Date timeUsageStarted; + + /** + * The inclusive start timestamp for the usage window. This value must be before {@code timeUsageEnded}. + * @param timeUsageStarted the value to set + * @return this builder + **/ + public Builder timeUsageStarted(java.util.Date timeUsageStarted) { + this.timeUsageStarted = timeUsageStarted; + this.__explicitlySet__.add("timeUsageStarted"); + return this; + } + /** + * The exclusive end timestamp for the usage window. This value must be after {@code timeUsageStarted}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUsageEnded") + private java.util.Date timeUsageEnded; + + /** + * The exclusive end timestamp for the usage window. This value must be after {@code timeUsageStarted}. + * @param timeUsageEnded the value to set + * @return this builder + **/ + public Builder timeUsageEnded(java.util.Date timeUsageEnded) { + this.timeUsageEnded = timeUsageEnded; + this.__explicitlySet__.add("timeUsageEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSubscriptionUsageRecordDetails build() { + CreateSubscriptionUsageRecordDetails model = + new CreateSubscriptionUsageRecordDetails( + this.id, + this.marketplaceOfferId, + this.billingType, + this.usageDimensionName, + this.consumedQuantity, + this.amount, + this.currencyCode, + this.billingPeriod, + this.customerTenancyId, + this.billingIdentifier, + this.unitOfMeasure, + this.unitPrice, + this.productSku, + this.contractDuration, + this.additionalMetadata, + this.usageRecordId, + this.timeUsageStarted, + this.timeUsageEnded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSubscriptionUsageRecordDetails model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("marketplaceOfferId")) { + this.marketplaceOfferId(model.getMarketplaceOfferId()); + } + if (model.wasPropertyExplicitlySet("billingType")) { + this.billingType(model.getBillingType()); + } + if (model.wasPropertyExplicitlySet("usageDimensionName")) { + this.usageDimensionName(model.getUsageDimensionName()); + } + if (model.wasPropertyExplicitlySet("consumedQuantity")) { + this.consumedQuantity(model.getConsumedQuantity()); + } + if (model.wasPropertyExplicitlySet("amount")) { + this.amount(model.getAmount()); + } + if (model.wasPropertyExplicitlySet("currencyCode")) { + this.currencyCode(model.getCurrencyCode()); + } + if (model.wasPropertyExplicitlySet("billingPeriod")) { + this.billingPeriod(model.getBillingPeriod()); + } + if (model.wasPropertyExplicitlySet("customerTenancyId")) { + this.customerTenancyId(model.getCustomerTenancyId()); + } + if (model.wasPropertyExplicitlySet("billingIdentifier")) { + this.billingIdentifier(model.getBillingIdentifier()); + } + if (model.wasPropertyExplicitlySet("unitOfMeasure")) { + this.unitOfMeasure(model.getUnitOfMeasure()); + } + if (model.wasPropertyExplicitlySet("unitPrice")) { + this.unitPrice(model.getUnitPrice()); + } + if (model.wasPropertyExplicitlySet("productSku")) { + this.productSku(model.getProductSku()); + } + if (model.wasPropertyExplicitlySet("contractDuration")) { + this.contractDuration(model.getContractDuration()); + } + if (model.wasPropertyExplicitlySet("additionalMetadata")) { + this.additionalMetadata(model.getAdditionalMetadata()); + } + if (model.wasPropertyExplicitlySet("usageRecordId")) { + this.usageRecordId(model.getUsageRecordId()); + } + if (model.wasPropertyExplicitlySet("timeUsageStarted")) { + this.timeUsageStarted(model.getTimeUsageStarted()); + } + if (model.wasPropertyExplicitlySet("timeUsageEnded")) { + this.timeUsageEnded(model.getTimeUsageEnded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Partner-provided unique identifier for this usage record. This identifier must be unique per partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Partner-provided unique identifier for this usage record. This identifier must be unique per partner. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the marketplace offer being billed. A submit request can contain records for multiple marketplace offers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("marketplaceOfferId") + private final String marketplaceOfferId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the marketplace offer being billed. A submit request can contain records for multiple marketplace offers. + * @return the value + **/ + public String getMarketplaceOfferId() { + return marketplaceOfferId; + } + + /** + * The billing type this usage record applies to. + **/ + public enum BillingType { + FlatRate("FLAT_RATE"), + UsageBased("USAGE_BASED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BillingType v : BillingType.values()) { + map.put(v.getValue(), v); + } + } + + BillingType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BillingType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid BillingType: " + key); + } + }; + /** + * The billing type this usage record applies to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingType") + private final BillingType billingType; + + /** + * The billing type this usage record applies to. + * @return the value + **/ + public BillingType getBillingType() { + return billingType; + } + + /** + * The pricing dimension against which usage is being reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageDimensionName") + private final String usageDimensionName; + + /** + * The pricing dimension against which usage is being reported. + * @return the value + **/ + public String getUsageDimensionName() { + return usageDimensionName; + } + + /** + * An optional non-negative usage quantity being reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumedQuantity") + private final Double consumedQuantity; + + /** + * An optional non-negative usage quantity being reported. + * @return the value + **/ + public Double getConsumedQuantity() { + return consumedQuantity; + } + + /** + * The non-negative usage cost computed by the partner for the submitted usage quantity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("amount") + private final Double amount; + + /** + * The non-negative usage cost computed by the partner for the submitted usage quantity. + * @return the value + **/ + public Double getAmount() { + return amount; + } + + /** + * The ISO-4217 currency submitted for the computed usage cost. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currencyCode") + private final String currencyCode; + + /** + * The ISO-4217 currency submitted for the computed usage cost. + * @return the value + **/ + public String getCurrencyCode() { + return currencyCode; + } + + /** + * The billing period associated with this usage record in {@code YYYY-MM} format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingPeriod") + private final String billingPeriod; + + /** + * The billing period associated with this usage record in {@code YYYY-MM} format. + * @return the value + **/ + public String getBillingPeriod() { + return billingPeriod; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer tenancy associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerTenancyId") + private final String customerTenancyId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer tenancy associated with this usage record. + * @return the value + **/ + public String getCustomerTenancyId() { + return customerTenancyId; + } + + /** + * The partner billing identifier associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("billingIdentifier") + private final String billingIdentifier; + + /** + * The partner billing identifier associated with this usage record. + * @return the value + **/ + public String getBillingIdentifier() { + return billingIdentifier; + } + + /** + * The unit of measure associated with the reported usage quantity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unitOfMeasure") + private final String unitOfMeasure; + + /** + * The unit of measure associated with the reported usage quantity. + * @return the value + **/ + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + /** + * The unit price associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unitPrice") + private final Double unitPrice; + + /** + * The unit price associated with this usage record. + * @return the value + **/ + public Double getUnitPrice() { + return unitPrice; + } + + /** + * The product SKU associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productSku") + private final String productSku; + + /** + * The product SKU associated with this usage record. + * @return the value + **/ + public String getProductSku() { + return productSku; + } + + /** + * The contract duration associated with this usage record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contractDuration") + private final BillingFrequency contractDuration; + + /** + * The contract duration associated with this usage record. + * @return the value + **/ + public BillingFrequency getContractDuration() { + return contractDuration; + } + + /** + * Additional key/value metadata associated with this usage record for extensibility. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalMetadata") + private final java.util.List additionalMetadata; + + /** + * Additional key/value metadata associated with this usage record for extensibility. + * @return the value + **/ + public java.util.List getAdditionalMetadata() { + return additionalMetadata; + } + + /** + * Partner-provided usage record identifier for traceability. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageRecordId") + private final String usageRecordId; + + /** + * Partner-provided usage record identifier for traceability. + * @return the value + **/ + public String getUsageRecordId() { + return usageRecordId; + } + + /** + * The inclusive start timestamp for the usage window. This value must be before {@code timeUsageEnded}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUsageStarted") + private final java.util.Date timeUsageStarted; + + /** + * The inclusive start timestamp for the usage window. This value must be before {@code timeUsageEnded}. + * @return the value + **/ + public java.util.Date getTimeUsageStarted() { + return timeUsageStarted; + } + + /** + * The exclusive end timestamp for the usage window. This value must be after {@code timeUsageStarted}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUsageEnded") + private final java.util.Date timeUsageEnded; + + /** + * The exclusive end timestamp for the usage window. This value must be after {@code timeUsageStarted}. + * @return the value + **/ + public java.util.Date getTimeUsageEnded() { + return timeUsageEnded; + } + + @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("CreateSubscriptionUsageRecordDetails("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", marketplaceOfferId=").append(String.valueOf(this.marketplaceOfferId)); + sb.append(", billingType=").append(String.valueOf(this.billingType)); + sb.append(", usageDimensionName=").append(String.valueOf(this.usageDimensionName)); + sb.append(", consumedQuantity=").append(String.valueOf(this.consumedQuantity)); + sb.append(", amount=").append(String.valueOf(this.amount)); + sb.append(", currencyCode=").append(String.valueOf(this.currencyCode)); + sb.append(", billingPeriod=").append(String.valueOf(this.billingPeriod)); + sb.append(", customerTenancyId=").append(String.valueOf(this.customerTenancyId)); + sb.append(", billingIdentifier=").append(String.valueOf(this.billingIdentifier)); + sb.append(", unitOfMeasure=").append(String.valueOf(this.unitOfMeasure)); + sb.append(", unitPrice=").append(String.valueOf(this.unitPrice)); + sb.append(", productSku=").append(String.valueOf(this.productSku)); + sb.append(", contractDuration=").append(String.valueOf(this.contractDuration)); + sb.append(", additionalMetadata=").append(String.valueOf(this.additionalMetadata)); + sb.append(", usageRecordId=").append(String.valueOf(this.usageRecordId)); + sb.append(", timeUsageStarted=").append(String.valueOf(this.timeUsageStarted)); + sb.append(", timeUsageEnded=").append(String.valueOf(this.timeUsageEnded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSubscriptionUsageRecordDetails)) { + return false; + } + + CreateSubscriptionUsageRecordDetails other = (CreateSubscriptionUsageRecordDetails) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.marketplaceOfferId, other.marketplaceOfferId) + && java.util.Objects.equals(this.billingType, other.billingType) + && java.util.Objects.equals(this.usageDimensionName, other.usageDimensionName) + && java.util.Objects.equals(this.consumedQuantity, other.consumedQuantity) + && java.util.Objects.equals(this.amount, other.amount) + && java.util.Objects.equals(this.currencyCode, other.currencyCode) + && java.util.Objects.equals(this.billingPeriod, other.billingPeriod) + && java.util.Objects.equals(this.customerTenancyId, other.customerTenancyId) + && java.util.Objects.equals(this.billingIdentifier, other.billingIdentifier) + && java.util.Objects.equals(this.unitOfMeasure, other.unitOfMeasure) + && java.util.Objects.equals(this.unitPrice, other.unitPrice) + && java.util.Objects.equals(this.productSku, other.productSku) + && java.util.Objects.equals(this.contractDuration, other.contractDuration) + && java.util.Objects.equals(this.additionalMetadata, other.additionalMetadata) + && java.util.Objects.equals(this.usageRecordId, other.usageRecordId) + && java.util.Objects.equals(this.timeUsageStarted, other.timeUsageStarted) + && java.util.Objects.equals(this.timeUsageEnded, other.timeUsageEnded) + && 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.marketplaceOfferId == null + ? 43 + : this.marketplaceOfferId.hashCode()); + result = (result * PRIME) + (this.billingType == null ? 43 : this.billingType.hashCode()); + result = + (result * PRIME) + + (this.usageDimensionName == null + ? 43 + : this.usageDimensionName.hashCode()); + result = + (result * PRIME) + + (this.consumedQuantity == null ? 43 : this.consumedQuantity.hashCode()); + result = (result * PRIME) + (this.amount == null ? 43 : this.amount.hashCode()); + result = (result * PRIME) + (this.currencyCode == null ? 43 : this.currencyCode.hashCode()); + result = + (result * PRIME) + + (this.billingPeriod == null ? 43 : this.billingPeriod.hashCode()); + result = + (result * PRIME) + + (this.customerTenancyId == null ? 43 : this.customerTenancyId.hashCode()); + result = + (result * PRIME) + + (this.billingIdentifier == null ? 43 : this.billingIdentifier.hashCode()); + result = + (result * PRIME) + + (this.unitOfMeasure == null ? 43 : this.unitOfMeasure.hashCode()); + result = (result * PRIME) + (this.unitPrice == null ? 43 : this.unitPrice.hashCode()); + result = (result * PRIME) + (this.productSku == null ? 43 : this.productSku.hashCode()); + result = + (result * PRIME) + + (this.contractDuration == null ? 43 : this.contractDuration.hashCode()); + result = + (result * PRIME) + + (this.additionalMetadata == null + ? 43 + : this.additionalMetadata.hashCode()); + result = + (result * PRIME) + + (this.usageRecordId == null ? 43 : this.usageRecordId.hashCode()); + result = + (result * PRIME) + + (this.timeUsageStarted == null ? 43 : this.timeUsageStarted.hashCode()); + result = + (result * PRIME) + + (this.timeUsageEnded == null ? 43 : this.timeUsageEnded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/LifecycleDetailsEnum.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/LifecycleDetailsEnum.java index 4798d69b04..e6191c6bd2 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/LifecycleDetailsEnum.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/LifecycleDetailsEnum.java @@ -23,6 +23,9 @@ public enum LifecycleDetailsEnum { Deleting("DELETING"), Updating("UPDATING"), Deleted("DELETED"), + PendingCancellation("PENDING_CANCELLATION"), + Suspended("SUSPENDED"), + Canceled("CANCELED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/MetricType.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/MetricType.java index b802774477..edef6dd53f 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/MetricType.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/MetricType.java @@ -5,13 +5,14 @@ package com.oracle.bmc.self.model; /** - * Possible values for a metric types. + * Possible values for metric types. **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") public enum MetricType { OcpuHours("OCPU_HOURS"), InstanceHours("INSTANCE_HOURS"), CoreHours("CORE_HOURS"), + Each("EACH"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/OperationType.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/OperationType.java index 04c979de5b..a05987256d 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/OperationType.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/OperationType.java @@ -13,6 +13,7 @@ public enum OperationType { UpdateSubscription("UPDATE_SUBSCRIPTION"), DeleteSubscription("DELETE_SUBSCRIPTION"), MoveSubscription("MOVE_SUBSCRIPTION"), + SubmitSubscriptionUsageBatch("SUBMIT_SUBSCRIPTION_USAGE_BATCH"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/Partner.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/Partner.java new file mode 100644 index 0000000000..f9e41454f4 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/Partner.java @@ -0,0 +1,470 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * Marketplace publisher partner details. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Partner.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Partner extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "lifecycleState", + "freeformTags", + "definedTags", + "systemTags" + }) + public Partner( + String id, + String compartmentId, + String displayName, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique identifier of the marketplace publisher partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique identifier of the marketplace publisher partner. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The unique identifier of the compartment of partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The unique identifier of the compartment of partner. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of marketplace publisher partner. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current lifecycle state of the marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the marketplace publisher partner. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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.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.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.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.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 Partner build() { + Partner model = + new Partner( + this.id, + this.compartmentId, + this.displayName, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Partner model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + 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 unique identifier of the marketplace publisher partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique identifier of the marketplace publisher partner. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The unique identifier of the compartment of partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The unique identifier of the compartment of partner. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of marketplace publisher partner. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current lifecycle state of the marketplace publisher partner. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + 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); + } + throw new IllegalArgumentException("Invalid LifecycleState: " + key); + } + }; + /** + * The current lifecycle state of the marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the marketplace publisher partner. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * 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.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.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.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.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("Partner("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + 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 Partner)) { + return false; + } + + Partner other = (Partner) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.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-self/src/main/java/com/oracle/bmc/self/model/PartnerCollection.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/PartnerCollection.java new file mode 100644 index 0000000000..37d30f3f5e --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/PartnerCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * Results of listing marketplace publisher partners. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PartnerCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PartnerCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PartnerCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of marketplace publisher partners. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of marketplace publisher partners. + * @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 PartnerCollection build() { + PartnerCollection model = new PartnerCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PartnerCollection 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); + } + + /** + * The list of marketplace publisher partners. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of marketplace publisher partners. + * @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("PartnerCollection("); + 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 PartnerCollection)) { + return false; + } + + PartnerCollection other = (PartnerCollection) 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-self/src/main/java/com/oracle/bmc/self/model/PartnerSummary.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/PartnerSummary.java new file mode 100644 index 0000000000..c218f02fca --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/PartnerSummary.java @@ -0,0 +1,435 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * Summary of a marketplace publisher partner. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PartnerSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PartnerSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "lifecycleState", + "freeformTags", + "definedTags", + "systemTags" + }) + public PartnerSummary( + String id, + String compartmentId, + String displayName, + Partner.LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique identifier of the marketplace publisher partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique identifier of the marketplace publisher partner. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The unique identifier of the compartment of partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The unique identifier of the compartment of partner. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of marketplace publisher partner. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current lifecycle state of the marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Partner.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the marketplace publisher partner. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Partner.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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.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.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.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.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 PartnerSummary build() { + PartnerSummary model = + new PartnerSummary( + this.id, + this.compartmentId, + this.displayName, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PartnerSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + 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 unique identifier of the marketplace publisher partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique identifier of the marketplace publisher partner. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The unique identifier of the compartment of partner. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The unique identifier of the compartment of partner. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of marketplace publisher partner. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current lifecycle state of the marketplace publisher partner. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Partner.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the marketplace publisher partner. + * @return the value + **/ + public Partner.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * 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.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.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.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.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("PartnerSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + 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 PartnerSummary)) { + return false; + } + + PartnerSummary other = (PartnerSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.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-self/src/main/java/com/oracle/bmc/self/model/PricingPlan.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/PricingPlan.java index f8515e2173..c39eb13940 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/PricingPlan.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/PricingPlan.java @@ -25,7 +25,8 @@ public final class PricingPlan extends com.oracle.bmc.http.internal.ExplicitlySe "planDescription", "billingFrequency", "planDuration", - "rates" + "rates", + "dimensions" }) public PricingPlan( PlanType planType, @@ -33,7 +34,8 @@ public PricingPlan( String planDescription, BillingFrequency billingFrequency, PlanDuration planDuration, - java.util.List rates) { + java.util.List rates, + java.util.List dimensions) { super(); this.planType = planType; this.planName = planName; @@ -41,6 +43,7 @@ public PricingPlan( this.billingFrequency = billingFrequency; this.planDuration = planDuration; this.rates = rates; + this.dimensions = dimensions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -94,13 +97,13 @@ public Builder planDescription(String planDescription) { return this; } /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the interval at which billing occurs for the subscription plan or usage dimension. **/ @com.fasterxml.jackson.annotation.JsonProperty("billingFrequency") private BillingFrequency billingFrequency; /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the interval at which billing occurs for the subscription plan or usage dimension. * @param billingFrequency the value to set * @return this builder **/ @@ -110,13 +113,13 @@ public Builder billingFrequency(BillingFrequency billingFrequency) { return this; } /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the duration of the subscription plan. **/ @com.fasterxml.jackson.annotation.JsonProperty("planDuration") private PlanDuration planDuration; /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the duration of the subscription plan. * @param planDuration the value to set * @return this builder **/ @@ -141,6 +144,22 @@ public Builder rates(java.util.List rates) { this.__explicitlySet__.add("rates"); return this; } + /** + * Metered usage dimensions associated with the pricing plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private java.util.List dimensions; + + /** + * Metered usage dimensions associated with the pricing plan. + * @param dimensions the value to set + * @return this builder + **/ + public Builder dimensions(java.util.List dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -153,7 +172,8 @@ public PricingPlan build() { this.planDescription, this.billingFrequency, this.planDuration, - this.rates); + this.rates, + this.dimensions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -180,6 +200,9 @@ public Builder copy(PricingPlan model) { if (model.wasPropertyExplicitlySet("rates")) { this.rates(model.getRates()); } + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } return this; } } @@ -200,6 +223,8 @@ public Builder toBuilder() { **/ public enum PlanType { Fixed("FIXED"), + UsageBased("USAGE_BASED"), + Hybrid("HYBRID"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -285,60 +310,13 @@ public String getPlanDescription() { } /** - * Specifies the interval at which billing occurs for the subscription plan. - **/ - public enum BillingFrequency { - Yearly("YEARLY"), - - /** - * 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(BillingFrequency.class); - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (BillingFrequency v : BillingFrequency.values()) { - if (v != UnknownEnumValue) { - map.put(v.getValue(), v); - } - } - } - - BillingFrequency(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static BillingFrequency create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - LOG.warn( - "Received unknown value '{}' for enum 'BillingFrequency', returning UnknownEnumValue", - key); - return UnknownEnumValue; - } - }; - /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the interval at which billing occurs for the subscription plan or usage dimension. **/ @com.fasterxml.jackson.annotation.JsonProperty("billingFrequency") private final BillingFrequency billingFrequency; /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the interval at which billing occurs for the subscription plan or usage dimension. * @return the value **/ public BillingFrequency getBillingFrequency() { @@ -346,10 +324,15 @@ public BillingFrequency getBillingFrequency() { } /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the duration of the subscription plan. **/ public enum PlanDuration { + Monthly("MONTHLY"), + Quarterly("QUARTERLY"), + SemiAnnual("SEMI_ANNUAL"), Annual("ANNUAL"), + Biennial("BIENNIAL"), + Triennial("TRIENNIAL"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -393,13 +376,13 @@ public static PlanDuration create(String key) { } }; /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the duration of the subscription plan. **/ @com.fasterxml.jackson.annotation.JsonProperty("planDuration") private final PlanDuration planDuration; /** - * Specifies the interval at which billing occurs for the subscription plan. + * Specifies the duration of the subscription plan. * @return the value **/ public PlanDuration getPlanDuration() { @@ -420,6 +403,20 @@ public java.util.List getRates() { return rates; } + /** + * Metered usage dimensions associated with the pricing plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private final java.util.List dimensions; + + /** + * Metered usage dimensions associated with the pricing plan. + * @return the value + **/ + public java.util.List getDimensions() { + return dimensions; + } + @Override public String toString() { return this.toString(true); @@ -440,6 +437,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", billingFrequency=").append(String.valueOf(this.billingFrequency)); sb.append(", planDuration=").append(String.valueOf(this.planDuration)); sb.append(", rates=").append(String.valueOf(this.rates)); + sb.append(", dimensions=").append(String.valueOf(this.dimensions)); sb.append(")"); return sb.toString(); } @@ -460,6 +458,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.billingFrequency, other.billingFrequency) && java.util.Objects.equals(this.planDuration, other.planDuration) && java.util.Objects.equals(this.rates, other.rates) + && java.util.Objects.equals(this.dimensions, other.dimensions) && super.equals(other); } @@ -477,6 +476,7 @@ public int hashCode() { + (this.billingFrequency == null ? 43 : this.billingFrequency.hashCode()); result = (result * PRIME) + (this.planDuration == null ? 43 : this.planDuration.hashCode()); result = (result * PRIME) + (this.rates == null ? 43 : this.rates.hashCode()); + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/SubmitSubscriptionUsageRecordsDetails.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/SubmitSubscriptionUsageRecordsDetails.java new file mode 100644 index 0000000000..1660bd2a78 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/SubmitSubscriptionUsageRecordsDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * Request payload to submit one or more usage records for marketplace offers. + * + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SubmitSubscriptionUsageRecordsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SubmitSubscriptionUsageRecordsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionUsageRecords"}) + public SubmitSubscriptionUsageRecordsDetails( + java.util.List subscriptionUsageRecords) { + super(); + this.subscriptionUsageRecords = subscriptionUsageRecords; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The usage records to submit. The array must contain at least one record and no more than 100 records. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionUsageRecords") + private java.util.List subscriptionUsageRecords; + + /** + * The usage records to submit. The array must contain at least one record and no more than 100 records. + * @param subscriptionUsageRecords the value to set + * @return this builder + **/ + public Builder subscriptionUsageRecords( + java.util.List subscriptionUsageRecords) { + this.subscriptionUsageRecords = subscriptionUsageRecords; + this.__explicitlySet__.add("subscriptionUsageRecords"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SubmitSubscriptionUsageRecordsDetails build() { + SubmitSubscriptionUsageRecordsDetails model = + new SubmitSubscriptionUsageRecordsDetails(this.subscriptionUsageRecords); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SubmitSubscriptionUsageRecordsDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionUsageRecords")) { + this.subscriptionUsageRecords(model.getSubscriptionUsageRecords()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The usage records to submit. The array must contain at least one record and no more than 100 records. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionUsageRecords") + private final java.util.List subscriptionUsageRecords; + + /** + * The usage records to submit. The array must contain at least one record and no more than 100 records. + * @return the value + **/ + public java.util.List getSubscriptionUsageRecords() { + return subscriptionUsageRecords; + } + + @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("SubmitSubscriptionUsageRecordsDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionUsageRecords=") + .append(String.valueOf(this.subscriptionUsageRecords)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SubmitSubscriptionUsageRecordsDetails)) { + return false; + } + + SubmitSubscriptionUsageRecordsDetails other = (SubmitSubscriptionUsageRecordsDetails) o; + return java.util.Objects.equals( + this.subscriptionUsageRecords, other.subscriptionUsageRecords) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionUsageRecords == null + ? 43 + : this.subscriptionUsageRecords.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/SubscriptionDetails.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/SubscriptionDetails.java index 81a9389232..b777a801a1 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/model/SubscriptionDetails.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/SubscriptionDetails.java @@ -34,7 +34,7 @@ public SubscriptionDetails( String partnerRegistrationUrl, String currency, Float amount, - BillingDetails billingDetails, + java.util.List billingDetails, Boolean isAutoRenew) { super(); this.pricingPlan = pricingPlan; @@ -104,11 +104,18 @@ public Builder amount(Float amount) { this.__explicitlySet__.add("amount"); return this; } - + /** + * Billing details associated with the subscription plan and its usage dimensions. + **/ @com.fasterxml.jackson.annotation.JsonProperty("billingDetails") - private BillingDetails billingDetails; + private java.util.List billingDetails; - public Builder billingDetails(BillingDetails billingDetails) { + /** + * Billing details associated with the subscription plan and its usage dimensions. + * @param billingDetails the value to set + * @return this builder + **/ + public Builder billingDetails(java.util.List billingDetails) { this.billingDetails = billingDetails; this.__explicitlySet__.add("billingDetails"); return this; @@ -232,10 +239,17 @@ public Float getAmount() { return amount; } + /** + * Billing details associated with the subscription plan and its usage dimensions. + **/ @com.fasterxml.jackson.annotation.JsonProperty("billingDetails") - private final BillingDetails billingDetails; + private final java.util.List billingDetails; - public BillingDetails getBillingDetails() { + /** + * Billing details associated with the subscription plan and its usage dimensions. + * @return the value + **/ + public java.util.List getBillingDetails() { return billingDetails; } diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/model/UsageDimension.java b/bmc-self/src/main/java/com/oracle/bmc/self/model/UsageDimension.java new file mode 100644 index 0000000000..9b45a0bffe --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/model/UsageDimension.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.model; + +/** + * A metered usage dimension associated with a usage-based or hybrid pricing plan. + *
+ * 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 #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = UsageDimension.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UsageDimension extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "dimensionName", + "dimensionKey", + "dimensionDescription", + "metricType", + "dimensionBillingFrequency", + "includedQuantity", + "rates" + }) + public UsageDimension( + String dimensionName, + String dimensionKey, + String dimensionDescription, + MetricType metricType, + BillingFrequency dimensionBillingFrequency, + Float includedQuantity, + java.util.List rates) { + super(); + this.dimensionName = dimensionName; + this.dimensionKey = dimensionKey; + this.dimensionDescription = dimensionDescription; + this.metricType = metricType; + this.dimensionBillingFrequency = dimensionBillingFrequency; + this.includedQuantity = includedQuantity; + this.rates = rates; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the usage dimension. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionName") + private String dimensionName; + + /** + * The name of the usage dimension. + * @param dimensionName the value to set + * @return this builder + **/ + public Builder dimensionName(String dimensionName) { + this.dimensionName = dimensionName; + this.__explicitlySet__.add("dimensionName"); + return this; + } + /** + * The stable key used internally to map this usage dimension to billing details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionKey") + private String dimensionKey; + + /** + * The stable key used internally to map this usage dimension to billing details. + * @param dimensionKey the value to set + * @return this builder + **/ + public Builder dimensionKey(String dimensionKey) { + this.dimensionKey = dimensionKey; + this.__explicitlySet__.add("dimensionKey"); + return this; + } + /** + * A detailed explanation of the usage dimension. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionDescription") + private String dimensionDescription; + + /** + * A detailed explanation of the usage dimension. + * @param dimensionDescription the value to set + * @return this builder + **/ + public Builder dimensionDescription(String dimensionDescription) { + this.dimensionDescription = dimensionDescription; + this.__explicitlySet__.add("dimensionDescription"); + return this; + } + /** + * The metric type in which usage is measured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricType") + private MetricType metricType; + + /** + * The metric type in which usage is measured. + * @param metricType the value to set + * @return this builder + **/ + public Builder metricType(MetricType metricType) { + this.metricType = metricType; + this.__explicitlySet__.add("metricType"); + return this; + } + /** + * Specifies the interval at which the usage dimension is billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionBillingFrequency") + private BillingFrequency dimensionBillingFrequency; + + /** + * Specifies the interval at which the usage dimension is billed. + * @param dimensionBillingFrequency the value to set + * @return this builder + **/ + public Builder dimensionBillingFrequency(BillingFrequency dimensionBillingFrequency) { + this.dimensionBillingFrequency = dimensionBillingFrequency; + this.__explicitlySet__.add("dimensionBillingFrequency"); + return this; + } + /** + * Quantity included in the base fee for hybrid plans. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includedQuantity") + private Float includedQuantity; + + /** + * Quantity included in the base fee for hybrid plans. + * @param includedQuantity the value to set + * @return this builder + **/ + public Builder includedQuantity(Float includedQuantity) { + this.includedQuantity = includedQuantity; + this.__explicitlySet__.add("includedQuantity"); + return this; + } + /** + * Dimension-level rates in various supported currencies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rates") + private java.util.List rates; + + /** + * Dimension-level rates in various supported currencies. + * @param rates the value to set + * @return this builder + **/ + public Builder rates(java.util.List rates) { + this.rates = rates; + this.__explicitlySet__.add("rates"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UsageDimension build() { + UsageDimension model = + new UsageDimension( + this.dimensionName, + this.dimensionKey, + this.dimensionDescription, + this.metricType, + this.dimensionBillingFrequency, + this.includedQuantity, + this.rates); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UsageDimension model) { + if (model.wasPropertyExplicitlySet("dimensionName")) { + this.dimensionName(model.getDimensionName()); + } + if (model.wasPropertyExplicitlySet("dimensionKey")) { + this.dimensionKey(model.getDimensionKey()); + } + if (model.wasPropertyExplicitlySet("dimensionDescription")) { + this.dimensionDescription(model.getDimensionDescription()); + } + if (model.wasPropertyExplicitlySet("metricType")) { + this.metricType(model.getMetricType()); + } + if (model.wasPropertyExplicitlySet("dimensionBillingFrequency")) { + this.dimensionBillingFrequency(model.getDimensionBillingFrequency()); + } + if (model.wasPropertyExplicitlySet("includedQuantity")) { + this.includedQuantity(model.getIncludedQuantity()); + } + if (model.wasPropertyExplicitlySet("rates")) { + this.rates(model.getRates()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the usage dimension. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionName") + private final String dimensionName; + + /** + * The name of the usage dimension. + * @return the value + **/ + public String getDimensionName() { + return dimensionName; + } + + /** + * The stable key used internally to map this usage dimension to billing details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionKey") + private final String dimensionKey; + + /** + * The stable key used internally to map this usage dimension to billing details. + * @return the value + **/ + public String getDimensionKey() { + return dimensionKey; + } + + /** + * A detailed explanation of the usage dimension. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionDescription") + private final String dimensionDescription; + + /** + * A detailed explanation of the usage dimension. + * @return the value + **/ + public String getDimensionDescription() { + return dimensionDescription; + } + + /** + * The metric type in which usage is measured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricType") + private final MetricType metricType; + + /** + * The metric type in which usage is measured. + * @return the value + **/ + public MetricType getMetricType() { + return metricType; + } + + /** + * Specifies the interval at which the usage dimension is billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensionBillingFrequency") + private final BillingFrequency dimensionBillingFrequency; + + /** + * Specifies the interval at which the usage dimension is billed. + * @return the value + **/ + public BillingFrequency getDimensionBillingFrequency() { + return dimensionBillingFrequency; + } + + /** + * Quantity included in the base fee for hybrid plans. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includedQuantity") + private final Float includedQuantity; + + /** + * Quantity included in the base fee for hybrid plans. + * @return the value + **/ + public Float getIncludedQuantity() { + return includedQuantity; + } + + /** + * Dimension-level rates in various supported currencies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rates") + private final java.util.List rates; + + /** + * Dimension-level rates in various supported currencies. + * @return the value + **/ + public java.util.List getRates() { + return rates; + } + + @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("UsageDimension("); + sb.append("super=").append(super.toString()); + sb.append("dimensionName=").append(String.valueOf(this.dimensionName)); + sb.append(", dimensionKey=").append(String.valueOf(this.dimensionKey)); + sb.append(", dimensionDescription=").append(String.valueOf(this.dimensionDescription)); + sb.append(", metricType=").append(String.valueOf(this.metricType)); + sb.append(", dimensionBillingFrequency=") + .append(String.valueOf(this.dimensionBillingFrequency)); + sb.append(", includedQuantity=").append(String.valueOf(this.includedQuantity)); + sb.append(", rates=").append(String.valueOf(this.rates)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UsageDimension)) { + return false; + } + + UsageDimension other = (UsageDimension) o; + return java.util.Objects.equals(this.dimensionName, other.dimensionName) + && java.util.Objects.equals(this.dimensionKey, other.dimensionKey) + && java.util.Objects.equals(this.dimensionDescription, other.dimensionDescription) + && java.util.Objects.equals(this.metricType, other.metricType) + && java.util.Objects.equals( + this.dimensionBillingFrequency, other.dimensionBillingFrequency) + && java.util.Objects.equals(this.includedQuantity, other.includedQuantity) + && java.util.Objects.equals(this.rates, other.rates) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.dimensionName == null ? 43 : this.dimensionName.hashCode()); + result = (result * PRIME) + (this.dimensionKey == null ? 43 : this.dimensionKey.hashCode()); + result = + (result * PRIME) + + (this.dimensionDescription == null + ? 43 + : this.dimensionDescription.hashCode()); + result = (result * PRIME) + (this.metricType == null ? 43 : this.metricType.hashCode()); + result = + (result * PRIME) + + (this.dimensionBillingFrequency == null + ? 43 + : this.dimensionBillingFrequency.hashCode()); + result = + (result * PRIME) + + (this.includedQuantity == null ? 43 : this.includedQuantity.hashCode()); + result = (result * PRIME) + (this.rates == null ? 43 : this.rates.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/requests/CancelSubscriptionRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/CancelSubscriptionRequest.java new file mode 100644 index 0000000000..5bc083caf0 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/CancelSubscriptionRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.requests; + +import com.oracle.bmc.self.model.*; +/** + * Example: Click here to see how to use CancelSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class CancelSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.self.model.CancelSubscriptionDetails> { + + /** + * The unique identifier for the subscription. + */ + private String subscriptionId; + + /** + * The unique identifier for the subscription. + */ + public String getSubscriptionId() { + return subscriptionId; + } + /** + * Details for the cancellation request. + */ + private com.oracle.bmc.self.model.CancelSubscriptionDetails cancelSubscriptionDetails; + + /** + * Details for the cancellation request. + */ + public com.oracle.bmc.self.model.CancelSubscriptionDetails getCancelSubscriptionDetails() { + return cancelSubscriptionDetails; + } + /** + * 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.self.model.CancelSubscriptionDetails getBody$() { + return cancelSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelSubscriptionRequest, + com.oracle.bmc.self.model.CancelSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The unique identifier for the subscription. + */ + private String subscriptionId = null; + + /** + * The unique identifier for the subscription. + * @param subscriptionId the value to set + * @return this builder instance + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Details for the cancellation request. + */ + private com.oracle.bmc.self.model.CancelSubscriptionDetails cancelSubscriptionDetails = + null; + + /** + * Details for the cancellation request. + * @param cancelSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder cancelSubscriptionDetails( + com.oracle.bmc.self.model.CancelSubscriptionDetails cancelSubscriptionDetails) { + this.cancelSubscriptionDetails = cancelSubscriptionDetails; + 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.util.internal.Consumer + 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(CancelSubscriptionRequest o) { + subscriptionId(o.getSubscriptionId()); + cancelSubscriptionDetails(o.getCancelSubscriptionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelSubscriptionRequest + */ + public CancelSubscriptionRequest build() { + CancelSubscriptionRequest 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.self.model.CancelSubscriptionDetails body) { + cancelSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of CancelSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CancelSubscriptionRequest + */ + public CancelSubscriptionRequest buildWithoutInvocationCallback() { + CancelSubscriptionRequest request = new CancelSubscriptionRequest(); + request.subscriptionId = subscriptionId; + request.cancelSubscriptionDetails = cancelSubscriptionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CancelSubscriptionRequest(subscriptionId, cancelSubscriptionDetails, 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() + .subscriptionId(subscriptionId) + .cancelSubscriptionDetails(cancelSubscriptionDetails) + .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(",subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(",cancelSubscriptionDetails=") + .append(String.valueOf(this.cancelSubscriptionDetails)); + 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 CancelSubscriptionRequest)) { + return false; + } + + CancelSubscriptionRequest other = (CancelSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals( + this.cancelSubscriptionDetails, other.cancelSubscriptionDetails) + && 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.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = + (result * PRIME) + + (this.cancelSubscriptionDetails == null + ? 43 + : this.cancelSubscriptionDetails.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-self/src/main/java/com/oracle/bmc/self/requests/ListPartnersRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListPartnersRequest.java new file mode 100644 index 0000000000..73ca1b5be6 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListPartnersRequest.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.requests; + +import com.oracle.bmc.self.model.*; +/** + * Example: Click here to see how to use ListPartnersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class ListPartnersRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.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 name. + */ + private String displayName; + + /** + * A filter to return only resources that match the given name. + */ + public String getDisplayName() { + return displayName; + } + /** + * The field to sort by. Only one sort order may be provided. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ProductId("productId"), + ; + + 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. + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.self.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.self.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * 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.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.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.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.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * 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< + ListPartnersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.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 name. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given name. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * @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.self.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.self.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + 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.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.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.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.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; + } + + /** + * 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.util.internal.Consumer + 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(ListPartnersRequest o) { + compartmentId(o.getCompartmentId()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPartnersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPartnersRequest + */ + public ListPartnersRequest build() { + ListPartnersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPartnersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPartnersRequest + */ + public ListPartnersRequest buildWithoutInvocationCallback() { + ListPartnersRequest request = new ListPartnersRequest(); + request.compartmentId = compartmentId; + request.displayName = displayName; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPartnersRequest(compartmentId, displayName, sortBy, sortOrder, limit, page, 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) + .displayName(displayName) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .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(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + 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 ListPartnersRequest)) { + return false; + } + + ListPartnersRequest other = (ListPartnersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && 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.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.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.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListSubscriptionsRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListSubscriptionsRequest.java index d700c9fe5c..9ba883012b 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListSubscriptionsRequest.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListSubscriptionsRequest.java @@ -115,7 +115,6 @@ public com.oracle.bmc.self.model.SortOrder getSortOrder() { public enum SortBy { TimeCreated("timeCreated"), DisplayName("displayName"), - SelfTokenId("selfTokenId"), ProductId("productId"), ; diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListingSubscriptionsRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListingSubscriptionsRequest.java index 25c45b751e..7ee08e61cc 100644 --- a/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListingSubscriptionsRequest.java +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/ListingSubscriptionsRequest.java @@ -45,7 +45,6 @@ public String getDisplayName() { public enum SortBy { TimeCreated("timeCreated"), DisplayName("displayName"), - SelfTokenId("selfTokenId"), ProductId("productId"), ; diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageBatchRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageBatchRequest.java new file mode 100644 index 0000000000..c929bc3584 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageBatchRequest.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.requests; + +import com.oracle.bmc.self.model.*; +/** + * Example: Click here to see how to use SubmitSubscriptionUsageBatchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageBatchRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * UTF-8 CSV file with no more than 10,000 usage records and a maximum size of 50 MB. + * Required columns are {@code MarketplaceOfferId}, {@code Id}, {@code Amount}, {@code CurrencyCode}, + * {@code UsageStartTime}, {@code UsageEndTime}, and {@code UsageDimensionName}. + * Optional columns are {@code ConsumedQuantity}, {@code CustomerTenancyId}, + * {@code BillingIdentifier}, {@code ProductSku}, {@code UnitOfMeasure}, {@code UnitPrice}, + * {@code ContractDuration}, and {@code AdditionalMetadata}. + * When provided in CSV, {@code AdditionalMetadata} must be a JSON array of {@code ExtendedMetadata} + * objects. {@code MarketplaceOfferId} must be a subscription or private offer OCID. + * + */ + private java.io.InputStream submitSubscriptionUsageBatchDetails; + + /** + * UTF-8 CSV file with no more than 10,000 usage records and a maximum size of 50 MB. + * Required columns are {@code MarketplaceOfferId}, {@code Id}, {@code Amount}, {@code CurrencyCode}, + * {@code UsageStartTime}, {@code UsageEndTime}, and {@code UsageDimensionName}. + * Optional columns are {@code ConsumedQuantity}, {@code CustomerTenancyId}, + * {@code BillingIdentifier}, {@code ProductSku}, {@code UnitOfMeasure}, {@code UnitPrice}, + * {@code ContractDuration}, and {@code AdditionalMetadata}. + * When provided in CSV, {@code AdditionalMetadata} must be a JSON array of {@code ExtendedMetadata} + * objects. {@code MarketplaceOfferId} must be a subscription or private offer OCID. + * + */ + public java.io.InputStream getSubmitSubscriptionUsageBatchDetails() { + return submitSubscriptionUsageBatchDetails; + } + /** + * 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 java.io.InputStream getBody$() { + return submitSubscriptionUsageBatchDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SubmitSubscriptionUsageBatchRequest, java.io.InputStream> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * UTF-8 CSV file with no more than 10,000 usage records and a maximum size of 50 MB. + * Required columns are {@code MarketplaceOfferId}, {@code Id}, {@code Amount}, {@code CurrencyCode}, + * {@code UsageStartTime}, {@code UsageEndTime}, and {@code UsageDimensionName}. + * Optional columns are {@code ConsumedQuantity}, {@code CustomerTenancyId}, + * {@code BillingIdentifier}, {@code ProductSku}, {@code UnitOfMeasure}, {@code UnitPrice}, + * {@code ContractDuration}, and {@code AdditionalMetadata}. + * When provided in CSV, {@code AdditionalMetadata} must be a JSON array of {@code ExtendedMetadata} + * objects. {@code MarketplaceOfferId} must be a subscription or private offer OCID. + * + */ + private java.io.InputStream submitSubscriptionUsageBatchDetails = null; + + /** + * UTF-8 CSV file with no more than 10,000 usage records and a maximum size of 50 MB. + * Required columns are {@code MarketplaceOfferId}, {@code Id}, {@code Amount}, {@code CurrencyCode}, + * {@code UsageStartTime}, {@code UsageEndTime}, and {@code UsageDimensionName}. + * Optional columns are {@code ConsumedQuantity}, {@code CustomerTenancyId}, + * {@code BillingIdentifier}, {@code ProductSku}, {@code UnitOfMeasure}, {@code UnitPrice}, + * {@code ContractDuration}, and {@code AdditionalMetadata}. + * When provided in CSV, {@code AdditionalMetadata} must be a JSON array of {@code ExtendedMetadata} + * objects. {@code MarketplaceOfferId} must be a subscription or private offer OCID. + * + * @param submitSubscriptionUsageBatchDetails the value to set + * @return this builder instance + */ + public Builder submitSubscriptionUsageBatchDetails( + java.io.InputStream submitSubscriptionUsageBatchDetails) { + this.submitSubscriptionUsageBatchDetails = submitSubscriptionUsageBatchDetails; + 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.util.internal.Consumer + 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(SubmitSubscriptionUsageBatchRequest o) { + compartmentId(o.getCompartmentId()); + submitSubscriptionUsageBatchDetails(o.getSubmitSubscriptionUsageBatchDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SubmitSubscriptionUsageBatchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SubmitSubscriptionUsageBatchRequest + */ + public SubmitSubscriptionUsageBatchRequest build() { + SubmitSubscriptionUsageBatchRequest 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$(java.io.InputStream body) { + submitSubscriptionUsageBatchDetails(body); + return this; + } + + /** + * Build the instance of SubmitSubscriptionUsageBatchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SubmitSubscriptionUsageBatchRequest + */ + public SubmitSubscriptionUsageBatchRequest buildWithoutInvocationCallback() { + SubmitSubscriptionUsageBatchRequest request = new SubmitSubscriptionUsageBatchRequest(); + request.compartmentId = compartmentId; + request.submitSubscriptionUsageBatchDetails = submitSubscriptionUsageBatchDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new SubmitSubscriptionUsageBatchRequest(compartmentId, submitSubscriptionUsageBatchDetails, 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() + .compartmentId(compartmentId) + .submitSubscriptionUsageBatchDetails(submitSubscriptionUsageBatchDetails) + .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(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",submitSubscriptionUsageBatchDetails=") + .append(String.valueOf(this.submitSubscriptionUsageBatchDetails)); + 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 SubmitSubscriptionUsageBatchRequest)) { + return false; + } + + SubmitSubscriptionUsageBatchRequest other = (SubmitSubscriptionUsageBatchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.submitSubscriptionUsageBatchDetails, + other.submitSubscriptionUsageBatchDetails) + && 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.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.submitSubscriptionUsageBatchDetails == null + ? 43 + : this.submitSubscriptionUsageBatchDetails.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-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageRecordsRequest.java b/bmc-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageRecordsRequest.java new file mode 100644 index 0000000000..0ff3688137 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/requests/SubmitSubscriptionUsageRecordsRequest.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.requests; + +import com.oracle.bmc.self.model.*; +/** + * Example: Click here to see how to use SubmitSubscriptionUsageRecordsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageRecordsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Usage records to submit for marketplace offers. + * + */ + private com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails + submitSubscriptionUsageRecordsDetails; + + /** + * Usage records to submit for marketplace offers. + * + */ + public com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails + getSubmitSubscriptionUsageRecordsDetails() { + return submitSubscriptionUsageRecordsDetails; + } + /** + * 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.self.model.SubmitSubscriptionUsageRecordsDetails getBody$() { + return submitSubscriptionUsageRecordsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SubmitSubscriptionUsageRecordsRequest, + com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment associated with the usage records request. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Usage records to submit for marketplace offers. + * + */ + private com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails + submitSubscriptionUsageRecordsDetails = null; + + /** + * Usage records to submit for marketplace offers. + * + * @param submitSubscriptionUsageRecordsDetails the value to set + * @return this builder instance + */ + public Builder submitSubscriptionUsageRecordsDetails( + com.oracle.bmc.self.model.SubmitSubscriptionUsageRecordsDetails + submitSubscriptionUsageRecordsDetails) { + this.submitSubscriptionUsageRecordsDetails = submitSubscriptionUsageRecordsDetails; + 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.util.internal.Consumer + 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(SubmitSubscriptionUsageRecordsRequest o) { + compartmentId(o.getCompartmentId()); + submitSubscriptionUsageRecordsDetails(o.getSubmitSubscriptionUsageRecordsDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SubmitSubscriptionUsageRecordsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SubmitSubscriptionUsageRecordsRequest + */ + public SubmitSubscriptionUsageRecordsRequest build() { + SubmitSubscriptionUsageRecordsRequest 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.self.model.SubmitSubscriptionUsageRecordsDetails body) { + submitSubscriptionUsageRecordsDetails(body); + return this; + } + + /** + * Build the instance of SubmitSubscriptionUsageRecordsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SubmitSubscriptionUsageRecordsRequest + */ + public SubmitSubscriptionUsageRecordsRequest buildWithoutInvocationCallback() { + SubmitSubscriptionUsageRecordsRequest request = + new SubmitSubscriptionUsageRecordsRequest(); + request.compartmentId = compartmentId; + request.submitSubscriptionUsageRecordsDetails = submitSubscriptionUsageRecordsDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new SubmitSubscriptionUsageRecordsRequest(compartmentId, submitSubscriptionUsageRecordsDetails, 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() + .compartmentId(compartmentId) + .submitSubscriptionUsageRecordsDetails(submitSubscriptionUsageRecordsDetails) + .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(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",submitSubscriptionUsageRecordsDetails=") + .append(String.valueOf(this.submitSubscriptionUsageRecordsDetails)); + 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 SubmitSubscriptionUsageRecordsRequest)) { + return false; + } + + SubmitSubscriptionUsageRecordsRequest other = (SubmitSubscriptionUsageRecordsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.submitSubscriptionUsageRecordsDetails, + other.submitSubscriptionUsageRecordsDetails) + && 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.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.submitSubscriptionUsageRecordsDetails == null + ? 43 + : this.submitSubscriptionUsageRecordsDetails.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-self/src/main/java/com/oracle/bmc/self/responses/CancelSubscriptionResponse.java b/bmc-self/src/main/java/com/oracle/bmc/self/responses/CancelSubscriptionResponse.java new file mode 100644 index 0000000000..82481ead21 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/responses/CancelSubscriptionResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.responses; + +import com.oracle.bmc.self.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class CancelSubscriptionResponse 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 Subscription instance. + */ + private com.oracle.bmc.self.model.Subscription subscription; + + /** + * The returned Subscription instance. + * @return the value + */ + public com.oracle.bmc.self.model.Subscription getSubscription() { + return subscription; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "subscription" + }) + private CancelSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.self.model.Subscription subscription) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.subscription = subscription; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 Subscription instance. + */ + private com.oracle.bmc.self.model.Subscription subscription; + + /** + * The returned Subscription instance. + * @param subscription the value to set + * @return this builder + */ + public Builder subscription(com.oracle.bmc.self.model.Subscription subscription) { + this.subscription = subscription; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + subscription(o.getSubscription()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CancelSubscriptionResponse build() { + return new CancelSubscriptionResponse( + __httpStatusCode__, headers, etag, opcRequestId, subscription); + } + } + + /** + * 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(",subscription=").append(String.valueOf(subscription)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelSubscriptionResponse)) { + return false; + } + + CancelSubscriptionResponse other = (CancelSubscriptionResponse) 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.subscription, other.subscription); + } + + @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.subscription == null ? 43 : this.subscription.hashCode()); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/responses/ListPartnersResponse.java b/bmc-self/src/main/java/com/oracle/bmc/self/responses/ListPartnersResponse.java new file mode 100644 index 0000000000..ef0a0d68d6 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/responses/ListPartnersResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.responses; + +import com.oracle.bmc.self.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class ListPartnersResponse 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.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.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PartnerCollection instance. + */ + private com.oracle.bmc.self.model.PartnerCollection partnerCollection; + + /** + * The returned PartnerCollection instance. + * @return the value + */ + public com.oracle.bmc.self.model.PartnerCollection getPartnerCollection() { + return partnerCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "partnerCollection" + }) + private ListPartnersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.self.model.PartnerCollection partnerCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.partnerCollection = partnerCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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.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.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 PartnerCollection instance. + */ + private com.oracle.bmc.self.model.PartnerCollection partnerCollection; + + /** + * The returned PartnerCollection instance. + * @param partnerCollection the value to set + * @return this builder + */ + public Builder partnerCollection( + com.oracle.bmc.self.model.PartnerCollection partnerCollection) { + this.partnerCollection = partnerCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPartnersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + partnerCollection(o.getPartnerCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPartnersResponse build() { + return new ListPartnersResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, partnerCollection); + } + } + + /** + * 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(",partnerCollection=").append(String.valueOf(partnerCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPartnersResponse)) { + return false; + } + + ListPartnersResponse other = (ListPartnersResponse) 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.partnerCollection, other.partnerCollection); + } + + @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.partnerCollection == null ? 43 : this.partnerCollection.hashCode()); + return result; + } +} diff --git a/bmc-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageBatchResponse.java b/bmc-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageBatchResponse.java new file mode 100644 index 0000000000..ca7556cb9a --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageBatchResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.responses; + +import com.oracle.bmc.self.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageBatchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 SubmitSubscriptionUsageBatchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @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 + */ + public Builder copy(SubmitSubscriptionUsageBatchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SubmitSubscriptionUsageBatchResponse build() { + return new SubmitSubscriptionUsageBatchResponse( + __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 SubmitSubscriptionUsageBatchResponse)) { + return false; + } + + SubmitSubscriptionUsageBatchResponse other = (SubmitSubscriptionUsageBatchResponse) 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-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageRecordsResponse.java b/bmc-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageRecordsResponse.java new file mode 100644 index 0000000000..129036d387 --- /dev/null +++ b/bmc-self/src/main/java/com/oracle/bmc/self/responses/SubmitSubscriptionUsageRecordsResponse.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.self.responses; + +import com.oracle.bmc.self.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20260129") +public class SubmitSubscriptionUsageRecordsResponse 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 SubmitSubscriptionUsageRecordsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap 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 + */ + public Builder copy(SubmitSubscriptionUsageRecordsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SubmitSubscriptionUsageRecordsResponse build() { + return new SubmitSubscriptionUsageRecordsResponse( + __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 SubmitSubscriptionUsageRecordsResponse)) { + return false; + } + + SubmitSubscriptionUsageRecordsResponse other = (SubmitSubscriptionUsageRecordsResponse) 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-servicecatalog/pom.xml b/bmc-servicecatalog/pom.xml index 0dc9ebbd4a..96790c4acc 100644 --- a/bmc-servicecatalog/pom.xml +++ b/bmc-servicecatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-servicecatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-servicemanagerproxy/pom.xml b/bmc-servicemanagerproxy/pom.xml index e01e604d6c..db64643b6c 100644 --- a/bmc-servicemanagerproxy/pom.xml +++ b/bmc-servicemanagerproxy/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-servicemanagerproxy @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ 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 f5c85f7437..2ed777715e 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 - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index 819e070c97..aaea781c6b 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml diff --git a/bmc-stackmonitoring/pom.xml b/bmc-stackmonitoring/pom.xml index 2b91a06d78..83bd16ae10 100644 --- a/bmc-stackmonitoring/pom.xml +++ b/bmc-stackmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-stackmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 9a498cb4cb..af1c2b75af 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-streaming @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-tenantmanagercontrolplane/pom.xml b/bmc-tenantmanagercontrolplane/pom.xml index e251aa3a91..5269eb41dc 100644 --- a/bmc-tenantmanagercontrolplane/pom.xml +++ b/bmc-tenantmanagercontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-tenantmanagercontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-threatintelligence/pom.xml b/bmc-threatintelligence/pom.xml index d3a916a24a..601a5f6603 100644 --- a/bmc-threatintelligence/pom.xml +++ b/bmc-threatintelligence/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-threatintelligence @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-usage/pom.xml b/bmc-usage/pom.xml index ed45b87824..b6579d7dbd 100644 --- a/bmc-usage/pom.xml +++ b/bmc-usage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-usage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-usageapi/pom.xml b/bmc-usageapi/pom.xml index 5393f876e5..7f75bcc25f 100644 --- a/bmc-usageapi/pom.xml +++ b/bmc-usageapi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-usageapi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-vault/pom.xml b/bmc-vault/pom.xml index 6621aac40c..25a7dbae5e 100644 --- a/bmc-vault/pom.xml +++ b/bmc-vault/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-vault @@ -16,12 +16,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.95.0 + 2.97.0 diff --git a/bmc-vbsinst/pom.xml b/bmc-vbsinst/pom.xml index 1a3ce48065..8fc992e28b 100644 --- a/bmc-vbsinst/pom.xml +++ b/bmc-vbsinst/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-vbsinst @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-visualbuilder/pom.xml b/bmc-visualbuilder/pom.xml index c8da39f14b..bbe662fd91 100644 --- a/bmc-visualbuilder/pom.xml +++ b/bmc-visualbuilder/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-visualbuilder @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-vnmonitoring/pom.xml b/bmc-vnmonitoring/pom.xml index 8394f0163c..4ce1249321 100644 --- a/bmc-vnmonitoring/pom.xml +++ b/bmc-vnmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-vnmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-vulnerabilityscanning/pom.xml b/bmc-vulnerabilityscanning/pom.xml index 04c13617f5..727665f517 100644 --- a/bmc-vulnerabilityscanning/pom.xml +++ b/bmc-vulnerabilityscanning/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-vulnerabilityscanning @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-waa/pom.xml b/bmc-waa/pom.xml index ea74fb452e..57710eca31 100644 --- a/bmc-waa/pom.xml +++ b/bmc-waa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-waa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 6b0ae56852..59bdc3ad8a 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-waas @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-waf/pom.xml b/bmc-waf/pom.xml index 83c9b4cc16..32793ddbb0 100644 --- a/bmc-waf/pom.xml +++ b/bmc-waf/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-waf @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-wlms/pom.xml b/bmc-wlms/pom.xml index 9d61d8b47f..32ff50bcf0 100644 --- a/bmc-wlms/pom.xml +++ b/bmc-wlms/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-wlms @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index 9ff05a57fc..4469aed6a6 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-workrequests @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 diff --git a/bmc-zpr/pom.xml b/bmc-zpr/pom.xml index 642330ea55..9056ca9cf5 100644 --- a/bmc-zpr/pom.xml +++ b/bmc-zpr/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 ../pom.xml oci-java-sdk-zpr @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.95.0 + 2.97.0 \ No newline at end of file diff --git a/pom.xml b/pom.xml index ba07705084..64c918fa64 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 2.95.0 + 2.97.0 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure @@ -894,6 +894,8 @@ bmc-databasetoolsruntime bmc-costad bmc-datacc + bmc-ddfs + bmc-distributeddatabasev26 bmc-full bmc-shaded